I'm trying to solve a differential equation but am stuck on a specific step that involves integration. Could someone please explain how the following is true?

If we integrate both sides both sides with respect to t, I would have expected the following result:

1/(1+t^2) - 1/(1+1^2)*y = 3*arctan(t) + C

And factoring out the 1/(1+t^2) from the left, we would get [1/(1+t^2)](y-1). Solving for y becomes

-3*arctan(t)*(1+t^2) +1 + C = y

Why am I incorrect?