Solve dy/dx = [ sin(2x+y)/cos(2x+y) ] - 2

and show that sin(2x+y) = e^x is a solution of the above if y(0)=pi/2

I solved the above DE using 2x+y= u substitution to get ,
ln (sin(2x+y)) - x - c = 0 ; where c is an arbitrary constant.

How do solve the next part?

Use the initial condition.

ln (sin(2x+y)) - x - c = 0
sin(2x+y) = e^(x+c)
or, using a different c,
sin(2x+y) = c e^x
y(0) = pi/2, so
sin(pi/2) = c e^0
c = 1
Thus, sin(2x+y) = e^x as desired.
To show that works, take y' using implicit differentiation.
cos(2x+y) (2 + y') = e^x
and you can see that that can be rearranged into the original DE.