We use long division method to divide 3c^5+5c^2+c+5 by (c+2)
color(white)(xxxxxxx)3c^4-6c^3+12c^2-19c+39
color(white)(xx) c+2| bar(3c^5+0c^4+0c^3+5c^2+c+5)
color(white)(xxxxxxx)ul(3c^5+6c^4)color(white)(xx)color(red)(darr) - subtracting
color(white)(xxxxxxxxx)-6c^4+0c^3
color(white)(xxxxxxx**x)ul(-6c^4-12c^3)
color(white)(xxxxxxxxxxxxxxx)12c^3+5c^2
color(white)(xxxxxxxxxxxxxxx)ul(12c^3+24c^2
color(white)(xxxxxxxxxxxxxxxxxx)-19c^2color(white)(xx)+c
color(white)(xxxxxxxxxxxxxxxxxxx)ul(-19c^2-38c)
color(white)(xxxxxxxxxxxxxxxxxxxxxxxxx)39c+5
color(white)(xxxxxxxxxxxxxxxxxxxxxXXX) ul(39c+78)
color(white)(xxxxxxxxxxxxxxxxxxxxxxxxxxx)-73
WE can check it using Remainder theorem, as 3c^5+5c^2+c+5 is divided by c+2,
we should get a remainder 3(-2)^5+5(-2)^2-2+5=3xx(-32)+5xx4-2+5=-96+20-2+5=-73
and hence (3c^5+5c^2+c+5)/(c+2)=3c^4-6c^3+12c^2-19c+39-73/(c+2)