You know from similar triangles that ...
KM/KO = LM/LN
(20 +x)/12 = x/8
Multiplying by 24, we get
2(20 +x) = 3x
40 +2x = 3x
Subtracting 2x, we get
40 = x . . . . . . . . . . the measure of LM
The Pythagorean theorem tells us
(LN)² +(NM)² = (LM)²
Substituting known values, this becomes
8² +(NM)² = 40²
(NM)² = 40² -8² = 1600 -64 = 1536
Then the measure of NM is ...
NM = √1536 ≈ 39.19