Write a trial solution for the method of indetermined coefficients:
y''+9y' = xe^(-x)cos(pi*x)
....I have no idea.
Try to do this problem first
y''+9y' = exp(p x)
Then use that cos(pi x) can be expressed in terms of exponential functions. Also, if you differentiate w.r.t. the parameter p, a factor x will come down on the right hand side of the differential equation.