Write it in reduced form as a ratio of polynomials p(x)/q(x)

We are given the following expression
[tex]\frac{x^2}{x-5}-\frac{8}{x-2}[/tex]Let us re-write the expression as a ratio of polynomials p(x)/q(x)
First of all, find the least common multiple (LCM) of the denominators.
The LCM of the denominators is given by
[tex](x-5)(x-2)[/tex]Now, adjust the fractions based on the LCM
[tex]\begin{gathered} \frac{x^2}{x-5}\times\frac{(x-2)}{(x-2)}=\frac{x^2(x-2)}{(x-5)(x-2)} \\ \frac{8^{}}{x-2}\times\frac{(x-5)}{(x-5)}=\frac{8(x-5)}{(x-2)(x-5)} \end{gathered}[/tex]So, the expression becomes
[tex]\frac{x^2(x-2)}{(x-5)(x-2)}-\frac{8(x-5)}{(x-2)(x-5)}[/tex]Now, apply the fraction rule
[tex]\frac{a}{c}-\frac{b}{c}=\frac{a-b}{c}[/tex][tex]\frac{x^2(x-2)}{(x-5)(x-2)}-\frac{8(x-5)}{(x-2)(x-5)}=\frac{x^2(x-2)-8(x-5)}{(x-5)(x-2)}[/tex]Finally, expand the products in the numerator
[tex]\frac{x^2(x-2)-8(x-5)}{(x-5)(x-2)}=\frac{x^3-2x^2-8x+40}{(x-5)(x-2)}[/tex]Therefore, the given expression as a ratio of polynomials p(x)/q(x) is
[tex]\frac{x^3-2x^2-8x+40}{(x-5)(x-2)}[/tex]