Given:
slope of 2
points (1,2) and (3,y)
Recall the slope-intercept form of the equation of a line.

Substitute the following values to the slope-intercept form

With b = 0, m = 2, and x = 3, substitute again to the slope-intercept form

Therefore, the value of y is equal to 6.