The difference between the two roots of the quadratic equation x^2+ax+b=0

is 32 and the larger root is 3 times the smaller root. What is the value of a and b ?

If the roots are p and q,

p+q = -a
pq = b

we know

q = 3p,
q-p = 32

3p-p = 32
p = 16
so, q = 48

p+q = 62
pq = 768

a = -62
b = 768