Hello from MrBillDoesMath!
Answer: No, the final expression (in the third rectangle) is incorrect.
Discussion.
The simplification shown in the second rectangle is correct but the simplification in the third rectangle (cancelling x^2) is not. The reason is that x^2 does NOT appear in each term in the numerator and denominator in the second rectangle so it can NOT be cancelled.
Now, if the second rectangle contained something like this,
( x^4 + x^3 -4x^2) / (x^4+ 3x^3+ 2x^2)
then x^2 could be cancelled from each term in the numerator and denominator. But that fraction is not what's in rectangle 2 so my original answer stands.
Regard, MrB