Consider the graphs of f(x) and g(x). Assume they are both linear functions and the slopes are different, so they cross.
Call the coordinates of the point where they cross (x, y). Then this same point (x, y) satisfies both:
y = f(x)
y = g(x)
So we have that
y = f(x) = g(x)
This is the step that you mentioned.