Hello Johann.
I'm not sure what you question is, but the statement you gave is certainly true. The perimeter is the sum of the lengths of the sides. A regular octagon is one in which the sides all have the same length, so if P is the perimeter and S is the length of one side, then P = 8S.
"Varies directly" simply means this: when one thing is twice as large, the other is twice as large (or any other factor). More formally, any equation of the form A=kB where A and B are variable quantities and k is a constant value is one in which A varies directly in proportion to B. In your case k = 8.
Stephen La Rocque.>
