Let's perform the synthetic division
#color(white)(aaaa)##3##color(white)(aaaaa)##|##color(white)(aaaa)##1##color(white)(aaaa)##5##color(white)(aaaa)##-2##color(white)(aaaa)##3#
#color(white)(aaaaaaaaaaaa)#________
#color(white)(aaaa)####color(white)(aaaaaaa)##|##color(white)(aaaa)####color(white)(aaaa)##3##color(white)(aaaaa)##24##color(white)(aaa)##66#
#color(white)(aaaaaaaaaaaa)#________
#color(white)(aaaa)####color(white)(aaaaaaa)##|##color(white)(aaaa)##1##color(white)(aaa)##8##color(white)(aaaaa)##22##color(white)(aaa)##color(red)(69)#
#P(x)=(x-3)(x^2+8x+22)+69#
The remainder is #=69# and the quotient is #=x^2+8x+22#
The remainder theorem is :
When we divide the polynomial #f(x)# by #(x-c)#
#f(x)=(x-c)q(x)+r#
#f(c)=0+r#
Applying the remainder theorem
#P(3)=(3^3)+(5*3^2)-(2*3)+3#
#=27+45-6+3#
#=69#
The remainder is #=69#