@yu-v suggested to you how to solve the problem, but you seem interested in bypassing the teacher's suggestion in favor of a (difficult!) direct evaluation.
Actually, in the Heisenberg picture, the problem behaves very much like its classical mechanics limit.
No need to know U explicitly explicitly, if you bypass the wrong equations (2.1) to (3.2). In the Heisenberg picture, $$ O_H(t) \equiv U^\dagger O_S(t) U, $$ where, here, U is the evolution operator you were not quite asked to find, and is a messy path-ordered exponential — distinctly not what you misuse in (2.1) & (2.2).
You should have, instead, $$ X(t) =U^\dagger X U , \qquad P(t) =U^\dagger P U, \qquad \qquad H(t)_H =U^\dagger H(t)_S U , $$ where $H_S$ is the time-dependent Hamiltonian actually given to you, above.
You actually need not evaluate explicitly P(t),X(t),HH, as long as you appreciate the similarity transformation involved and evaluate the intercalated commutators in the Schroedinger picture you were given. This is the heart of the problem and you must convince yourself of the intercalation principle involved.
Specifically, in the Heisenberg equations of motion, $$\frac{dX(t)}{dt} = \frac{i}{\hbar}[H_H(t),X_H(t)] \tag{6.1}$$ $$\frac{dP(t)}{dt} =\frac{i}{\hbar}[H_H(t),P_H(t)] \tag{6.2}$$ you must observe $$ \frac{i}{\hbar} [H_H(t),X_H(t)]=\frac{i}{\hbar}U^\dagger [H_S(t),X] U=U^\dagger P U ~/m = P(t)/m \tag{6.3}$$ $$ \frac{i}{\hbar} [H_H(t),P_H(t)]=\frac{i}{\hbar}U^\dagger [H_S(t),P] U \\ = U^\dagger (-m\omega^2 X + qE_0 \cos (\omega' t)) U = -m\omega^2 X(t) +qE_0 \cos (\omega't), \tag{6.4}$$ resulting in $P(t)=m dX(t)/dt $, and therefore $$\frac{d^2X(t)}{dt^2} = -\omega^2 X(t) + (qE_0/m) \cos (\omega' t) .\tag{6.5} $$
The solution to (6.5) is the "classical" result $$ X(t)=\left( X_0-\frac{qE_0}{m(\omega^2-\omega'^2)} \right ) \cos (\omega t) + \frac{qE_0}{m(\omega^2-\omega'^2)} \cos(\omega ' t) , \tag {3.3}$$ where we have enforced the the vanishing velocity initial condition alreadyhas already been enforced setting a momentum-like integration constant equal to zero (hmm). Incidentally, since U(0)=I, $X_0=X$, the Schroedinger operator.
A far cry from (3.1),(3.2).
PSPS A friendlier version of (3.3) might well be $$ \bbox[yellow,5px]{ X(t)= X_0 \cos (\omega t) + \frac{2qE_0}{m(\omega^2-\omega'^2)} \sin\left (\frac{\omega ' +\omega}{2} t\right ) \sin \left (\frac{\omega ' -\omega}{2} t\right )}. \tag {3.3} $$ It is then evident how @Manvendra Somvanshi 's on-resonance limit comes about: as the driving frequency approaches the natural frequency, $\omega' \to \omega$, the oscillation gets to increase in time without bound, in the runaway limit, $$ X(t)\to X_0 \cos (\omega t) + \frac{qE_0 t}{2m\omega} \sin ( \omega t ). $$
If you used any of this, you should let your instructor know.If you used any of this, you should let your instructor know.