The slope of a line is given by the following formula:
Where (x1, y1) and (x2, y2) are two points where the line passes through.
In this case, we have two points (0, b) and (x, y). By replacing y for y2, b for y1, x for x2 and 0 for x1 into the above formula, we get: