Is the question you gave precisely what how the question was given to you? ( I assume Homework?)
I don't believe it's asking you to solve the equation, rather prove that it's possible for y to be a solution for any q and p.
e.g., q(x), p(x), are continuous in some neigborhood (\alpha,\beta) and y(x) is C^2 \; \forall x \in (\alpha,\beta) \Rightarrow Ly = 0 where the operator L is defined as L = (\frac{d^2}{dx^2} + p(x)\frac{d}{dx}+q(x)).
I'm just guessing, in fact, I think I mixed up the inference. Oh well, good luck! Was anything about smoothness of functions as solutions to ode's mentioned in class? It must have. I say this because this is a time-varying diff eq., which adds an order of magnitude of complexity from time-invariant diff eq.'s. Normally, you have to check for singular points over the interval (\alpha, \beta),but the problem gave you this assumption for free. And sin(x^2) certainly has at least 2 derivatives. Look in your notes =D.
EDITED: for LaTeX...