A question about ODE basics.

I am confused about the meaning of the unknown function in a differential equations.

For example, the Sturm-Liouville equation has the form . I notice that the unknown function is written without its variable , i.e. not written as , whereas the functions , and are written with variable .

The following rearrangement of equation is from my lecture notes about orthogonality of eigenfunctions of the Sturm-Liouville equation.

Why it is OK to move an unknown function of variable into a derivative operator by treating it like a constant? I am wondering if I have missed some very basic points about differential equations. Can someone please explain to my why the above rearrangement is possible and when one would write an unknown function as and when one would write an unknown function as in an ODE?