Answer
$x-2+\displaystyle \frac{2}{x-5}$
Work Step by Step
$\begin{array}{ccccccccccc}
& &x & -2 & & \\
& &--&--&--&\\
x-5&) & x^{2} &-7x& +12 & \\
& &x^{2} & -5x& & \color{red}{\leftarrow \small{x(x-5) } } \\
& &--&-- & &\color{red}{ \small{subtract}} \\
& & & -2x& +12 & \\
& & & -2x & +10& \color{red}{\leftarrow \small{-2(x-5) } }\\
& & &--&-- &\color{red}{ \small{subtract}} \\
& & & & 2 &\\
\end{array}$
Quotient = $x-2$
Remainder = $2$.
$\displaystyle \frac{dividend}{divisor}=quotient+\frac{remainder}{divisor}$
$\displaystyle \frac{ x^{2} -7x +12}{x-5}$ = $x-2+\displaystyle \frac{2}{x-5}$