If a line has slope m, then any line perpendicular to it has slope -1/m. In particular, a line through (7, 7) perpendicular to a line with slope m must be given by y= -(1/m)(x- 7)+ 7.
Of course, a line through the origin with slope m has equation y= mx. So you must solve y= mx= -(1/m)(x- 7)+ 7 for x. Find the y value from y= mx, and then find the distance from that (x, y) to (7, 7).