Let's differentiate implicitly,
don't worry about solving for y explicitly before differentiating.
(4y)cosx = x^2 + y^2
Apply product rule on the left,
and power rule on the right-hand terms,
(4y)'cosx + 4y(cosx)' = (x^2)' + (y^2)'
4y'cosx + 4y(-sinx) = 2x + 2yy'
4y'cosx - 4ysinx = 2x + 2yy'
Let's get both y' terms on the left side,
and everything else on the right,
4y'cosx -2yy' = 2x + 4ysinx
Factor y' out of each term,
y'(4cosx - 2y) = 2x + 4ysinx
Solve for y' (which is dy/dx) by dividing by the stuff,
y' = (2x + 4ysinx) / (4cosx - 2y)
You can divide a 2 out of everything to simplify it down a little bit.
y' = (x + 2ysinx) / (2cosx - y)