In the triangle ABC, BM is the altitude, so \( \angle BMA = 90^{\circ} \).
AK is the angle bisector of \( \angle BAC \).
We are given \( BC = 20 \) and the ratio \( BO : OM = 5 : 2 \).
Let \( BO = 5x \) and \( OM = 2x \). Then \( BM = BO + OM = 5x + 2x = 7x \).
In the right-angled triangle BMA, by Pythagorean theorem, \( AB^2 = BM^2 + AM^2 \).
In the right-angled triangle BMC, \( BC^2 = BM^2 + MC^2 \). We have \( 20^2 = (7x)^2 + MC^2 \), so \( 400 = 49x^2 + MC^2 \).
Since BM is the altitude, M is on AC. However, the location of M relative to A and C is not specified, other than it lies on the line AC.
The problem states that AK is the angle bisector. By the angle bisector theorem, \( \frac{AB}{AC} = \frac{BK}{KC} \).
This problem seems to require more information or a different approach. Let's re-examine the given information and the diagram. The diagram shows a triangle ABC with altitude BM and angle bisector AK. Point O is on BM. The ratio of segments of the altitude is given. The side BC is given. We need to find AC.
There is a property relating the angle bisector, altitude, and median from a vertex. If the triangle is isosceles with AB=BC, then the altitude, angle bisector, and median from B coincide. However, we don't know if the triangle is isosceles.
Let's consider the case where the triangle might be isosceles with AB = AC. In this case, the altitude from B would bisect AC, so M would be the midpoint. The angle bisector AK would also be the altitude and median. This contradicts the diagram where AK and BM are distinct lines intersecting at O.
Let's assume the diagram is representative. O is the intersection of BM and AK. Thus, O lies on AK. This means AK passes through O.
Consider \( \triangle ABM \) and \( \triangle CBM \). We have \( BC = 20 \).
Let's use coordinates. Let M be the origin (0,0). Since BM is the altitude, the line AC is the x-axis. Let B = (0, h). Then BM = h. From BO:OM = 5:2, if O is between B and M, let B = (0, 7k) and M = (0, 0). Then O = (0, 2k). This gives BM = 7k and BO = 5k, OM = 2k. This fits the ratio. So let BM = h. Then BO = \( \frac{5}{7}h \) and OM = \( \frac{2}{7}h \).
Let A = (-a, 0) and C = (c, 0). Then AC = a + c.
In \( \triangle CBM \), \( BC^2 = BM^2 + MC^2 \) => \( 20^2 = h^2 + c^2 \) => \( 400 = h^2 + c^2 \).
AK is the angle bisector. The equation of line AK passing through A=(-a, 0) and O=(0, \( \frac{2}{7}h \)) is \( y - 0 = \frac{\frac{2}{7}h - 0}{0 - (-a)}(x - (-a)) \) => \( y = \frac{2h}{7a}(x+a) \).
The angle bisector theorem states \( \frac{AB}{AC} = \frac{BK}{KC} \). This doesn't directly help without knowing K.
Let's reconsider the ratio BO:OM. This ratio is about the segments of the altitude BM. The point O is on BM and AK. Therefore, O is the intersection of the altitude and the angle bisector. This point is called the