Factor the two equations then, Multiply 7 x ^3 + 12 x^ 2 + x + 1/ x ^2 and x + 4 /x + 1
you get:( 7 x ^3 + 12 x ^2 + x + 1 ) ( x + 4 )/ x^ 2 ( x + 1 )