Here's the second one

For the homogeneous solution, try , thus we get the characteristic equation:

So,

For a particular solution, try ........I hope you notice your mistake here. You reused A and B for the sine and cosine functions, you can't do that, they should be different variables!

Plug these into the original equation, we get:

Collect like terms:

Equating coefficients we get:

Thus the general solution is: