From my understanding, you want the lines to exist between the given boundaries.
So first, you would draw the boundary lines defined above. The boundaries result in a rectangle with the corners as (-2,0), (-2,3), (4,3) and (4,0).
The linear equation is defined by y = mx+b where m is the slope and b is the y intercept.
The slope(m) of can be determined from rise/run or (y2-y1) / (x2-x1).
If the diagonal is from (-2,0) to (4,3) then we can define them as (-2,0) = (x1,y1) and (4,3) = (x2,y2).
The slop becomes (3-0)/(4-(-2)) = 3/6 = 1/2
b can be determined by plugging in a known coordinate that the line passes through (one of the 2 corners we know so here I will choose (-2,0) for simplicity) and the known m value then solving for b.
y = mx+b
0 = (1/2)(-2) + b
0 = -1+b
b = 1
So, the first equation is y = (1/2)x+1
The second equation is the other diagonal. We repeat getting m and b as before but for the other two corners ((-2,3) and (4,0)).
We can define them as (-2,3) = (x1,y1) and (4,0) = (x2,y2).
The slop becomes (0-3)/(4-(-2)) = -3/6 = -1/2
b can be determined by plugging in a known coordinate that the line passes through (one of the 2 corners we know so here I will choose (4,0) for simplicity) and the known m value then solving for b.
y = mx+b
0 = (-1/2)(4) + b
0 = -2+b
b = 2
So, the second equation is y = (-1/2)x+2
I hope this answers your question. Let me know if you need any more help.