Answer
The function of the graph passing through the points $\left( -1,\ -5 \right)$ and $\left( 2,\ 1 \right)$ is $y=2x-3$.
Work Step by Step
The equation of the line is $y-{{y}_{1}}=m\left( x-{{x}_{1}} \right)$ ,
Here, the point $\left( {{x}_{1}},\ {{y}_{1}} \right)=\left( -1,\ -5 \right)$ and $\left( {{x}_{2}},\ {{y}_{2}} \right)=\left( 2,\ 1 \right)$.
The value of the slope $m=\frac{{{y}_{2}}-{{y}_{1}}}{{{x}_{2}}-{{x}_{1}}}$.
$\begin{align}
& m=\frac{{{y}_{2}}-{{y}_{1}}}{{{x}_{2}}-{{x}_{1}}} \\
& =\frac{1-\left( -5 \right)}{2-\left( -1 \right)} \\
& =\frac{1+5}{2+1} \\
& =2
\end{align}$
Then,
$\begin{align}
& y-{{y}_{1}}=m\left( x-{{x}_{1}} \right) \\
& y+5=\left( 2 \right)\left( x+1 \right) \\
& y=2x+2-5 \\
& =2x-3
\end{align}$