Because the rolling ball and the fixed balls are the same size, when the rolling ball is rolling around each of the two fixed balls it will roll half of its circumference. So the total distance it rolls when rolling around the two fixed balls is its circumference: pi * diameter = 7(3.14) = 21.98 cm.
The ball will roll for (38-7) = 31 cm on each long edge of the rectangle and for 15 cm on each short edge.
The total distance it will travel going around once is then
You can put this solution on YOUR website!
I'll give a hint. The center of the shaded ball will follow the curved path shown in red.
The red curve is 3.5 cm away from the black perimeter (composed of the rectangle and black circles) because this is the radius of each ball (7/2 = 3.5)
Here's an interactive GeoGebra applet in which you can move the shaded ball around to get an idea of what's going on. https://www.geogebra.org/m/rymwmsxj
If the canvas is blank, you may need to refresh the page.
Or you may need to click the curved arrow at the center of the screen (after hovering your mouse over top).