This is a direct double integration problem, and checking each option by differentiating twice is a fast way to confirm the answer.
Only option (A) reproduces $\cos 2x$ after two derivatives and carries the two independent constants a second-order ODE needs, so it is the general solution.