To have a pictorial representation of this problem (the track), we will have the figure below:
To find the length of the track, we will sum up the length of two sides of the square and the circumference of the two half semicircles.
We will find the length of the square thus:
Now we will find the circumference of a half-circle:
Since the length of the square is also the diameter of the half circle:
The length of the track will be calculated with this expression: