Please help not sure how to do these

For the bottom graph slope = 2 and when x = -1 f(x) = -3 so equation is
f(x )= 2x - 1.
{ 2x - 1 ( x <= -1)
f(x) = {
{ x ( x >= 1)
We're given two points and two half lines, aka rays.
Point slope form says the line through (a,b) with slope m is
[tex] y-b = m(x-a)[/tex]
We can write that in slope-intercept form:
[tex]y = mx + (b-ma)[/tex]
The left line goes two up for every one to the right, that's a slope of 2. It ends at (-1,-3). So that line is:
[tex]y = 2x + (-3 -2(-1)) = 2x-1[/tex]
We turn that into the ray we like with the condition [tex] x \le -1[/tex] so it ends at our point.
The right ray has slope 1 and endpoint (1,5). That's [tex] x \ge 1 [/tex] with the line
[tex] y= x + (5-1(1))= x+4[/tex]
Answer:
[tex]y = 2x-1 \textrm{ if } x \le -1[/tex]
[tex]y =x+4 \textrm{ if } x \ge 1[/tex]