The radius of the semicircle passed by the small ant is r=6+2=8cm.
Its climbing distance is s =12 * 2+3.14 * 8 = 49.12 cm.
The radius of the semicircle that the small snail passes through is r=6cm.
Its climbing distance is s =12 * 2+3.14 * 6 = 42.84 cm.
The distance they climbed was 49. 12-42.84=6.28cm.
I hope it helps.
I wish you a happy study.