Answer:
<em>Assuming person A and person B are part of the 7 people</em>, there are 10 ways the 7 people can line up if A needs to be first or last and B needs to be in the middle.
Step-by-step explanation:
There are 2 places for A (first, last) and 5 places for B (anywhere but first or last). 2 x 5 = 10.
You can use elimination to solve systems of equations with 3 equations. I know how to solve systems of equatons with 3 equations, but I use a different process, I don't know how to use the elimination method.
The slope between (5,1) and (2,-7) is 8 over 3