Study of the psi(2)(3823) and chi(c1)(3872) states in B+->(J/psi pi(+)pi(-))K(+)decays