А)
числитель = x^2 -2x - 3 = x^2 - 1 - 2x - 2 = (x^2 - 1) - 2*(x+1) =
= (x-1)*(x+1) - 2*(x+1) = (x+1)*(x-1 -2) = (x+1)*(x-3).
знаменатель = x^2 + 2x + 1 = (x^2 + x) + (x+1) = x*(x+1) + (x+1) = (x+1)*(x+1).
дробь = (x+1)*(x-3)/( (x+1)*(x+1) ) = [сокращаем на (x+1)] = (x-3)/(x+1).
б)
числитель = x^2 - 4x + 4 = x^2 - 2x - 2x + 4 = x*(x-2) - 2*(x - 2) =
= (x-2)*(x-2).
знаменатель = x^2 + 2x - 8 = x^2 - 2x + 4x - 8 = x*(x-2) + 4*(x-2) =
= (x-2)*(x+4).
дробь = (x-2)*(x-2)/( (x-2)*(x+4) ) = [сокращаем на (x-2)] = (x-2)/(x+4).