We can use synthetic division to find the solution for P:
2|2 P -3 5
2 4 2P+8 | 4P+10
2 P+4 2P+5 | 4P+15.
4P+15=0 if f(x)/g(x) has no remainder. Quotient=2x2+(P+4)x+2P+5=2x2+x/4-5/2.
Therefore P=-15/4.
f(x)=2x3-15x2/4-3x+5.
CHECK: (x-2)(2x2+x/4-5/2)=2x3+x2/4-5x/2-4x2-x/2+5=2x3-15x2/4-3x+5.