On the interval from t=0 to t=1, divide by t+1 to obtain dtdx−t+12x=(t+1)3. This is a linear differential equation.
The integrating factor is e∫t+1−2dt=(t+1)−2. Thus dtd((t+1)2x)=t+1.
After integration, (t+1)2x=2(t+1)2+C. The initial value gives 2=21+C, so C=23.
Therefore x(t)=2(t+1)4+23(t+1)2 and x(1)=216+212=14.