Final answer:
The length of segment np is found by subtracting the length of segment mn from the length of segment mp, resulting in 13 cm, which is option (a).
Step-by-step explanation:
If points m, n, and p are collinear, and n is between m and p, then the segment lengths add up when taken in succession along the line.
Given that the length of mn is 18 cm and the length of mp is 31 cm, we can use subtraction to find the length of np since mp is the total distance from m to p, passing through n. To find np, we subtract the length of mn from mp: 31 cm - 18 cm, which equals 13 cm. Hence, the correct answer for the length of np is 13 cm, which corresponds to option (a).