Write down the formula for the equation of a line: y = mx + b, where m is the slope of the line, b is the y-intercept of the line (the point where the line crosses the y-axis), x is the x-coordinate of a point on the line and y is the y-coordinate of a point on the line calculated from a given x coordinate on the line.
Substitute the slope given in the problem for m in the equation. For this example, use a slope of 2 (m = 2) to obtain y = 2x + b.
Substitute the x and y coordinates given in the problem for x and y in the formula for the equation of the line. For this example, use an x coordinate of 3 and a y coordinate of 6 to obtain 6 = 2 * 3 + b. Simplify to obtain 6 = 6 + b.
Solve the resultant equation for b, the y-intercept, by subtracting the number on the right side of the equation from both sides of the equation: 6 - 6 = 6 + b - 6, to obtain the value for the y-intercept, 0 = b.
Rewrite the result in standard form, where the variable to solve for, b, is on the left side of the equation, obtaining b = 0.