You can also approach this problem in the following way as well.
The new line will be parallel to the line represented by y =2x +2
The equation y = 2x + 2 is written in slope- intercept form (i.e. y=mx + b) where m represents the slope. So the slope of this line is 2. A line parallel to y = 2x + 2 will have the same slope. This means the slope of the new line will also be 2.
To determine the equation of the new line, we can use the given point to find the y intercept of the new line:
y = 2x + b
Use x = -1 and y =3 to find b (or the y intercept ) of the new line:
3 = 2 * (-1) + b
3= -2 + b
Therefore, the equation of the line passing thru (-1,3) with the same slope as that of y = 2x + 2 will be:
y = 2x + 5