We use the pythagorean theorem and information about the rectangular prism to find the length of the hypotenuses that the spider walks along. Adding them together (5.39+5+5.83+3.91) gives us 20.13cm, the answer.