Normally to find a tangent we want to work out dy/dx, but since this equation is x=something, it's much easier to work out dx/dy first, then we get dy/dx by doing 1/(dx/dy)=dy/dx.
By the chain rule, dx/dy = -sin(2y+pi)2, since cos differentiates to -sin, and we need to remember to differentiate the bit in the brackets too, which is why we multiply by 2. Now let's substitute in our x and y values, and we get that dx/dy = -2sin(3pi/2) and (0, pi/4), which equals 2. So by using the little formula I gave earlier, we get dy/dx=1/2 here. So we know the tangent line has gradient 1/2, and passes through the point (0, pi/4), so we use the equation y=mx+c with m=1/2, which gives us c=pi/4, and the equation of the tangent line is y=1/2x + pi/4.