If f(x)=x^2+7x+20 has the same roots as g(x)=Ax^2+Bx+1, then
one must be a multiple of the other.
By comparison of the constant terms, we know that 20g(x)=f(x), or
g(x)=(1/20)f(x)
=(1/20)(x^2+7x+20)
=(1/20)x^2 + (7/20)x + 20/20
=(1/20)x^2 + (7/20)x + 1
Therefore A=(1/20), B=(7/20), and A+B=(1+7)/20=8/20=2/5