You can write the equation using either point, however first you must find the slope.
y2-y1 divided by x2-x1
(18-0)/(6-2) =4.5
Then put it into the point-slope form
y-y1=m(x-x1) which can be written two ways, once with each point
point (2,0) = y-0=4.5(x-2)
or
point (6,18) = y-18=4.5(x-6)