#P(x) = x^4+3x^3-4x^2+6x-31#.

The Remainder Theorem tells us that if we divide #P(x)#, by #x-c#, then the remainder is #P(c)#.

So we'll divide #P(x)# by #x-2#. You could use long division, but synthetic division requires less writing and we can use it for any linear divisor with leading coefficient #1#, so:

#"2" ||# #"1 " " " "3 " " " "-4 " " " "6" " " "-31#

#+# #"" " " " " "" "2" " " " 10" " " "12" " " " " "36"#

#"" " "##---------#

#"" " " " 1" " " " 5" " "" " "6" " " "18" " " "||" " 5"#

The remainder is #5#, so #P(2) = 5#

If you use long division, it will look something like:

#" " " " " " "# #x^3# #+5x^2##+6x# #+18#

#" " " "##-----------#

#x-2 )# #x^4# #+3x^3# # -4x^2# # +6x# # -31#

#" " " " # # x^4# #-2x^3#

#" " " "##-----------#

#" " " " " "" "# #5x^3##" "# # -4x^2# # +6x# # -31#

#" " " " " "" " # # 5x^3##" "# #-10x^2#

#" " " "##-----------#

#" " " " " " " " " "" " " " " " # # 6x^2# # +6x# #-31#

#" " " " " " " " " "" " " " " " # # 6x^2# # -12x#

#" " " "##-----------#

#" " " " " " " " " "" " " " " " " " " " # # 18x# # -31#

#" " " " " " " " " "" " " " " " " " " " # # 18x# # -36#

#" " " "##-----------#

#" " " " " " " " " "" " " " " " " " " " " " " " " "# # 5#

Again, the remainder is #5#, so #P(2) =5#