I assume you're asking what should you "guess" for the particular solution? If the RHS is say 3x + sin(x), then you should guess something like
ax^3 + bx^2 + cx + d sin(x) + e cos(x), unless these appeared in your homogeneous solution, in which case you should multiply the repeated term by x.