The equation of a horizontal line has the following form:
y = a
Where a is the value of the intercept with the y-axis
In this case, we want to represent a line that passes through the point (0, 2), then a = 2 and the equation of the line can be writen like this:
y = 2