Let's write the equations in slope-intercept form, y = mx + b
First let's find the slope for points (0,0) and (4,-2)
Slope = y2 - y1 / x2 -x1
slope = -2 - 0 / 4 - 0
slope = -2/4 = -1/2
So now we have the equation
y = -1/2x + b
We can now take one of the points on the line and substitute the x and y values into the equation, then solve for b.
-2 = -1/2(4) + b
-2 = -2 + b
0 = b
So now we can write our final equation
y = -1/2x + 0
or just
y = -1/2x
Let's do the same for the other points (-2,6); (0,3)
slope = 3-6/0-(-2) = -3/2
3 = -3/2(0) + b
3 = b
Final equation
y = -3/2x + 3