Close. Don't say "is," because you're not saying they're equal. And you are differentiating with respect to $x$, so the derivative of $\cos y$ - using the chain rule - is $(-\sin y)y'$. And that's just differentiating the left-hand side; now try what's on the right.
–
anonOct 9 '11 at 22:42

Now, the whole point of this business was to get $y^\prime$ by itself. So, move everything having to do with $y^\prime$ to one side of the equation and all other terms to the other.
$$
y^\prime - x\sin(y)y^\prime - x^2y^\prime = 2xy - \cos(y).
$$
Factoring out the $y^\prime$ gives
$$
y^\prime(1 - x\sin(y) - x^2) = 2xy - \cos(y).
$$
Finally, dividing to isolate $y^\prime$ leaves us with
$$
y^\prime = \frac{2xy - \cos(y)}{1 - x\sin(y) - x^2}.
$$