how do i wright linear functions

A linear function is the equation of a line. Here, you are given two points on the line, one of which is the y-intercept, and asked to write the equation. It can work reasonably well to use the 2-point form of the equation of a line.
For points (x1, y1) and (x2, y2), the equation of the line through them can be written as
... y = (y2 -y1)/(x2 -x1)·(x -x1) + y1
When it is possible to use x1 = 0, this is simplified somewhat, so we choose
... (x1, y1) = (0, -5) . . . . . . from f(0) = -5
... (x2, y2) = (5, -1) . . . . . .from f(5) = -1
Putting these values in the above formula, we get ...
... y = (-1 -(-5))/(5 - 0)·(x -0) -5
... y = 4/5x -5 . . . . . simplified
This can be put in the desired functional form using f(x) instead of y:
... f(x) = 4/5x -5
Here we're given two points on a line: (0,-5) and (5, -1). Going from the first point to the second, x increases by 5 and y increases by 4. Thus, the slope of the line is
m = 4/5 = 1. Use the point-slope formula to find the equation of this line:
y-(-5) = (4/5)(x). Thus, y = (4/5)x - 5 or f(x) = (4/5)x - 5