The question given could be analysed in general. But this attempt is only to the limitted sense of solving problems related with rational fractions and rational algebraic expressions.
If a rational fraction in the form p/q is given, we simplify it to the lowest posissible integers in both numerator and denominator. The purpose is that it easy for graping and also it is easy to deal with further calcalations in the simpler form.
Example 1: WE assume a given fraction like 21/77 is equal to 7*3/7*11.Here both numerator and denominators have the common factor 7. So we can divide both numerator and denominator by 7 and the result is 3/11.
Example 2: The given expression, (x^2-1)/(x+1) is equal to (x-1)(x+1)/(x-1) The common factor is x-1. So we simplify the given expression to x+1 of course x= not equal to zero.