Find the value for k, if the remainder is 12, when 2x^3+kx^2-18x+20 is divided by x-2.

I solved this question using long division and I got the correct answer of k=3.

My teacher says though I should do it this way:

P(2)=12

Therefore: 2(2)^3+k(2)^2-18(2)+20=12

16 +4k-36+20=12

4k=12

Therefore k=3

I understand that process of solving, but I don't understand how P(2) I get from x-2 =12(the remainder)

Anyone help explain??

Thanks

PS: Anyone know where I could find some worded problems for Cubic Functions, because we have not done any but there will be some in our Cubic Functions Test tomorrow?????