The equation y = mx + b will serve you well here. This is called "slope-intercept' form of the equation for a line, because m represents the slope and b represents the point where the line crosses the y axis, or y-intercept.
I think it's safe for us to assume that the origin O corresponds to the point (0, 0) on the coordinate plane. So, a line that passes through the origin will have a y-intercept of 0; that means b=0 and we don't have to worry about it.
Now, we need to find the slope. This is "rise over run". So, A (1, 2) is 2 above O and 1 to the right, so m = 2 / 1 = 2.
The final equation is y = 2x. You can verify this by plugging in a number (1) for which you know the answer (2), like so: y = 2(1) = 2. Bingo!
Now, a perpendicular line has a slope that is the negative reciprocal (flip the fraction over and negate it) of the first line. So, the slope of our new line is (-1/2). Now our equation is y = (-1/2)x + b. We need to find the value of b, so we need numbers to plug into our other variables. We have them, since the line (AB) passes through our given point (1, 2). So, solve the equation 2 = (-1/2)(1) + b for b, and you can find b and your final equation.
The line will cross the x-axis where y = 0, so set y equal to 0 in your equation and solve for x to find the coordinates.