I got to dy/dx = 1/sec^2y
Then I subbed in y=arctanx
What you needed to do was to think that you have a right angled triangle with an angle y whose tangent is equal to x / 1. So you have an opposite side of size x and an adjacent one of size 1. Hence the Hypotenuse is sqrt(1+x^2), and cos(y) = 1 / sqrt(1+x^2), so cos^2(y) = 1 / (1+x^2) as requested.
Note that 1 / sec^2(y) = cos^2(y).