This question can also be done using the remainder theorem. i.e. sub in the solutions x= 1 and x = 3 to create simultaneous equations, solve to find k and b.
eMaths.ie 

Copyright material from JC Fallon used with permission

Copyright © 2020
