finding values of variables in a equation, polynomial long division

I found this question on the internet while testing my knowledge and skills of math. This question has been use as part of the Flemish entrance exam for the study medicine (along with physics, biology, chemistry and psychological tests).

When is divisable by then what equals ?

They give as possible answers:

A. 12

B. 15

C. 18

D. 21

The correct answer is A. Can anyone please explain to me what approach you use to find this answer? I have absolutely no clue how to solve this. Source of the question: http://www.ond.vlaanderen.be/toelati...n_wiskunde.pdf

It's the fourth question.