First let us find the slope;
Slope for (x₁, y₁) and (x₂, y₂): (1, 2) and (0, 2)
Slope: (y₂ -y₁) / (x₂ -x₁)
Slope: ( 2 - 2) / (0 - 1) = 0/-1
Slope = 0
Using (y - y₁) = m(x - x₁)
using (1, 2) as (x₁, y₁)
(y - y₁) = m(x - x₁)
(y - 2) = 0*(x - 1)
y - 2 = 0
y = 0 + 2
y = 2
y = 2 is the equation of line through both points in the slope intercept form.