Question: what is the formula for finding distance of a point from origin?
Answer: Where (x′,y′) are coordinates of the point. Since you want distance of line from origin, the coordinates become (0,0) and hence the perpendicular distance of a line from origin is |Ax′+By′+c√A2+B2|=|0+0+c√A2+B2|=|c√A2+B2|.