We present a procedure to solve the Schrodinger equation of two interacting electrons in a quantum dot in the presence of an external magnetic field within the context of quasi-exactly-solvable spectral problems. We show that the symmetries of the Hamiltonian can be recovered for specific values of the magnetic field, which leads to an exact determination of the eigenvalues and eigenfunctions. We show that the problem possesses a hidden sl(2)-algebraic structure.