We can use the polynomial remainder theorem here.

will be exactly divisible by

if the remainder upon division of it by

is 0. The PRT says that this remainder is exactly equal to the value of the polynomial when

. We have

Since the remainder is 5, that's how much we should subtract from the original polynomial. So the integer that we need to add is -5.
To confirm: by the PRT, the remainder should be 0. We get
