Hey!
So, integrating by parts has this really helpful mnemonic device associated with it. ILATE - it's a priority list for what you should make your u. I - inverse trig functions L - log functions A - algebraic functions T - trig functions E - exponential functions. It's a listing of the easiest things to take the derivative of that will also simplify with each successive iteration.
a)
Start by making your u = x and then your du = dx
dv = sin(5x) and so your v = -1/5cos(5x)
b)
u = x^2
du = 2x dx
dv = e^3x dx
v = (e^3x)/3
x^2 * (e^3x)/3 - 1/3 * \int e^3x * 2x dx
Use by parts for the integral again.
u = 2x
du = 2 dx
dv = e^3x dx
v = 1/3 * e^3x
x^2 * (e^3x)/3 - 1/3 * ( 2x * 1/3 * e^3x - 2/3 * \int e^3x dx = ((x^2 * e^3x) - 1/3 ( (2x * e^3x)/3 - (2 *e^3x)/9 ) + C