Well that's your problem right there, the constant term 'A' is not linearly independent to your homogeneous solution, which also contains a constant term.... to account for the constant term (3) on the RHS of your DE, you need to add a term of the form Ax^r where r is the smallest non-negative integer such that no terms of the same order are present in your homogeneous solution....Ok, I have yp= A + B cosx + c sinx
where I get c1+c2x+c3e^6x