To answer this question you need to know the following:
(a) What is the definition of the "perimeter" of a polygon?
(b) How many sides does a pentagon have?
(a) The perimeter of a polygon is the sum of the lengths of all the sides of the polygon. It is the same as the distance covered starting and ending from the same point of that polygon.
(b) Think of the Pentagon in Washingon, DC. How many sides on that building? Five.
So if each side length is 8 inches, then going from one corner of the pentagon, once around and ending up at the same spot, you get 8 * 5 = 40 inches.