ĐK: x khác -1 và x khác 1.
\(PT\Leftrightarrow\frac{7x.\left(x+1\right)}{\left(x-1\right)\left(x+1\right)}-\frac{5x.\left(x-1\right)}{\left(x-1\right)\left(x+1\right)}+\frac{x+21}{\left(x-1\right)\left(x+1\right)}=0\)
<=> 7x2 + 7x - 5x2 + 5x + x + 21 = 0
<=> 2x2 + 13x + 21 = 0
<=> 2x2 + 6x + 7x + 21 = 0
<=> 2x.(x + 3) + 7.(x + 3) = 0
<=> (x + 3).(2x + 7) = 0
<=> x + 3 = 0 hoặc 2x + 7 = 0
<=> x = -3 hoặc x = -7/2
Vậy S = {-7/2; -3}.