Well, you need an X in the equation for a slanted line.
-Assuming the 7 is supposed to be 7x, it would be y=7x-2, the slope itself would be 7 over 1, rise over run.
-If there isn't supposed to be an X, then you would get y=5, which would make a straight line parallel to X-axis starting at the 5 tick mark on the Y-axis.
For the first answer (y=7x-2) you would simply subtract the 2 from the left side of the equation, moving it over to the opposite side.
This wouldn't subtract from the 7, because the variable X is attached to it.
(Remember, all numbers that don't have a negative sign in front of them, are positive. Here you are doing the opposite of the addition to cancel it out and in all of Algebra, what you do to one side you must do to the other.)
For the second one, assuming there was no X, you would do the same thing and subtract the 2. Only this time, it will be subtracted from the 7, because there is no variable.
The reason it would be a straight line, is because y=5, which means Y cannot equal anything but 5. However, the X can still be anything because it is not defined. Therefore, it will fill in all of those coordinates, but the Y will not move.