Th straight line equation in general case is
y = mx + b
where m is the slope
and b is the y intercept ( the point where the line crosses the y axis)
In this case we see value of b is equal to 3
just looking at the picture
now to find m , its suficient to have the coordinates of 2 points
looking at the picture, two points are
(2,2) and (-2,4)
then m is found by m = ( y- y')/(x-x')
now replace the values (2,2) and (-2,4)
m= (2-4)/(2-(-2))
so then m ,the slope is -1/2
and b = 3
finally write in slope intercept form
y= -1/2x + 3