First you find the general solution of the corresponding homogeneous equations ie. .

Then you look for a particular solution, since in this case we can guess that the particular solution will be of the form . Now you solve for and obviously, by substituting in the appropriate terms ie. and and into your original differential equation. Then you know the general form of the solution of nonhomogeneous equation is simply , where and are solutions of the homogeneous equation and is the particular solution we guessed and solved the constants and for. And and are arbitrary constants.