That is g'(x)=2.
So f' (x) = g' (x)+x 2 = 2+x 2.
The slope at (1, f( 1)) is replaced by 1, and f'( 1)=4 is obtained.
You confuse the tangent equation with the tangent slope ... the derivative value of the function derivative is the tangent slope, not the diagonal itself.