Need some help with this question. Cannot figure it out. Thank you

We are asked to find whether the function is increasing or decreasing over the interval [2, 7]
Let us find the derivative of the given function,
If the derivative is greater than 0 then the function is increasing.
If the derivative is less than 0 then the function is decreasing.
[tex]\begin{gathered} f(x)=-2x+4 \\ f^{\prime}(x)=-2x^{1-1}+0 \\ f^{\prime}(x)=-2x^0 \\ f^{\prime}(x)=-2 \end{gathered}[/tex]As you can see, the derivative is less than 0, which means that the function is decreasing.
The rate of change of the function is given by
[tex]m=\frac{y_2-y_1}{x_2-x_1}[/tex]We need to select any two points from the interval [2, 7]
[tex]\begin{gathered} f(2)=-2(2)+4=-4+4=0 \\ f(7)=-2(7)+4=-14+4=-10 \end{gathered}[/tex]So, the two points are (2, 0) and (7, -10)
[tex]m=\frac{y_2-y_1}{x_2-x_1}=\frac{-10-0}{7-2}=\frac{-10}{5}=-2[/tex]Therefore, the rate of change of function is -2