Answer
$$
f(x) =\frac{x^{2}-2 x+1}{x-3}
$$
A relative maximum occurs at $x=1,$ and the value of the function $f$ at this value is given by:
$$
\begin{aligned}
f(1) &=\frac{(1)^{2}-2 (1)+1}{(1)-3} \\
&=0. \\
\end{aligned}
$$
(**)
A relative minimum occurs at $x=5,$ and the value of the function $f$ at this value is given by:
$$
\begin{aligned}
f(5) &=\frac{(5)^{2}-2 (5)+1}{(5)-3} \\
&=8 \\
\end{aligned}
$$
Work Step by Step
$$
f(x) =\frac{x^{2}-2 x+1}{x-3}
$$
To find the intervals where the function is increasing and decreasing.
First, we find $f^{\prime}(x) $,
$$
\begin{aligned}
f^{\prime}(x) &=\frac{(x-3)(2 x-2)-\left(x^{2}-2 x+1\right)(1)}{(x-3)^{2}} \\
&=\frac{x^{2}-6 x+5}{(x-3)^{2}}
\end{aligned}
$$
To find the critical numbers, we first find any values of $x$ that make $f^{\prime} =0 $. Now, solve the equation $f^{\prime} =0 $ to get
$$
\begin{aligned}
f^{\prime}(x) =\frac{x^{2}-6 x+5}{(x-3)^{2}}&=0\\
\Rightarrow\quad\quad\quad\quad\quad\\
x^{2}-6 x+5 &=0\\
(x-1)(x-5) &=0\\
\Rightarrow\quad\quad\quad\quad\quad\\
x=1 & \quad \quad or \quad \quad x=5 \\
\end{aligned}
$$
Next, we find any values of $x$ where $f^{\prime}(x) $ fails to exist. This occurs whenever the denominator of $f^{\prime}(x) $ is $0$, here we observe that the denominator $(x-3)^{2}$ equal to 0, when $x=3$ But , $f(x) $ is not defined also at $x=3 $. therefore,
The only critical numbers are: $x =1 $ and $x=5$ .
We can still apply the first derivative test, however, to find where $f$ is increasing and decreasing. Now, check the sign of $f^{\prime}(x)$. in the intervals
$$
(-\infty, 1 ), \quad (1 ,5 ) , \quad \text {and} \quad (5, \infty).
$$
(1)
Test a number in the interval $(-\infty, 1 )$ say $0 $:
$$
\begin{aligned}
f^{\prime}(0) &=\frac{(0)^{2}-6 (0)+5}{((0)-3)^{2}}\\
&=\frac{5}{9} \\
&\approx 0.55 \\
&\gt 0
\end{aligned}
$$
we see that $f^{\prime}(x)$ is positive in that interval, so $f(x)$ is increasing on $(-\infty, 1 )$.
(2)
Test a number in the interval $ (1 ,5) $ say $ 2$:
$$
\begin{aligned}
f^{\prime}(2) &=\frac{(2)^{2}-6 (2)+5}{((2)-3)^{2}}\\
&=-3 \\
&\lt 0
\end{aligned}
$$
we see that $f^{\prime}(x)$ is negative in that interval, so $f(x)$ is decreasing on $(1 ,5 )$.
(3)
Test a number in the interval $(5, \infty )$ say $6 $:
$$
\begin{aligned}
f^{\prime}(6) &=\frac{(6)^{2}-6 (6)+5}{((6)-3)^{2}}\\
&=\frac{5}{9} \\
&\approx 0.55 \\
&\gt 0
\end{aligned}
$$
we see that $f^{\prime}(x)$ is positive in that interval, so $f(x)$ is increasing on $(5, \infty )$.
From (1), (2) and (3) we find that:
(*)
The function $f$ is increasing on interval $ ( -\infty , 1) , $ and is decreasing on interval $ (1 ,5 ) . $ So, a relative maximum occurs at $x=1,$ and the value of the function $f$ at this value is given by:
$$
\begin{aligned}
f(1) &=\frac{(1)^{2}-2 (1)+1}{(1)-3} \\
&=0. \\
\end{aligned}
$$
(**)
The function $f$ is decreasing on interval $ (1 ,5 ), $ and is increasing on interval $ ( 5 , \infty). $ So, a relative minimum occurs at $x=5,$ and the value of the function $f$ at this value is given by:
$$
\begin{aligned}
f(5) &=\frac{(5)^{2}-2 (5)+1}{(5)-3} \\
&=8 \\
\end{aligned}
$$