SOLUTION
A linear function is having the form
[tex]\begin{gathered} y=ax+b \\ \text{where } \\ a=\text{slope, b=y-intercept } \end{gathered}[/tex][tex]\begin{gathered} \text{when x=o, y=}1 \\ \text{substitute into the equation } \\ y=ax+b \\ 1=a(0)+b \\ \text{Hence } \\ b=1 \end{gathered}[/tex]Similarly, when x=-2, y=-5
Substitute into the equation for a linear function
[tex]\begin{gathered} y=ax+b \\ -5=a(-2)+1 \\ -5=-2a+1 \\ \text{subtract 1 from both sides } \\ -5-1=-2a \\ -6=-2a \end{gathered}[/tex][tex]\begin{gathered} \text{divide both sides by -2} \\ -\frac{6}{-2}=-\frac{2a}{-2} \\ \text{Then} \\ a=3 \end{gathered}[/tex]Hence
[tex]\begin{gathered} a=3,\text{ b=1} \\ \end{gathered}[/tex]The linear function becomes
Y = 3x + 1