How do I write the system of linear equations for this graph?

( 1 ) First graph -
x-intercept = 2
y-intercept = -4
[tex]y=2x-4[/tex]
[ Proof ]
[tex]2x-4=0\\2x=4\\x=2[/tex]
For y-intercept, it's y = 0 -4 = -4
( 2 ) Second graph -
x-intercept = 2
y-intercept = 1
slope = -1/2
[tex]y=-\frac{1}{2}x+1[/tex]
[ Proof ]
[tex]-\frac{1}{2}x+1=0\\-x+2=0\\-x=-2\\x=2[/tex]
For y-intercept, it's y = 0 + 1 = 1
So it's y = 2x - 4
and y = -1/2x + 1