To find the equation of a line, we can use the slope-intercept form of a linear equation, which is given by the formula:
y = mx + b
In this formula, m represents the slope of the line, and b represents the y-intercept.
From the question, we know that the slope (m) is 4 and the y-intercept (b) is 2. We can simply substitute these values into the formula:
y = 4x + 2
Thus, the equation of the line with a slope of 4 and a y-intercept of 2 is y = 4x + 2.