In the accompanying figure, the outer square $S$ has side length $40$. A second square $S'$ of side length $15$ is constructed inside $S$ with the same center as $S$ and with sides parallel to those of $S$. From each midpoint of a side of $S$, segments are drawn to the two closest vertices of $S'$. The result is a four-pointed starlike figure inscribed in $S$. The star figure is cut out and then folded to form a pyramid with base $S'$. Find the volume of this pyramid.

[asy]  pair S1 = (20, 20), S2 = (-20, 20), S3 = (-20, -20), S4 = (20, -20); pair M1 = (S1+S2)/2, M2 = (S2+S3)/2, M3=(S3+S4)/2, M4=(S4+S1)/2; pair Sp1 = (7.5, 7.5), Sp2=(-7.5, 7.5), Sp3 = (-7.5, -7.5), Sp4 = (7.5, -7.5);  draw(S1--S2--S3--S4--cycle); draw(Sp1--Sp2--Sp3--Sp4--cycle); draw(Sp1--M1--Sp2--M2--Sp3--M3--Sp4--M4--cycle); [/asy]
The volume of this pyramid can be found by the equation $V=\frac{1}{3}bh$, where $b$ is the base and $h$ is the height. The base is easy, since it is a square and has area $15^2=225$.

To find the height of the pyramid, the height of the four triangles is needed, which will be called $h^\prime$. By drawing a line through the middle of the larger square, we see that its length is equal to the length of the smaller rectangle and two of the triangle's heights. Then $40=2h^\prime +15$, which means that  $h^\prime=12.5$.

When the pyramid is made, you see that the height is the one of the legs of a right triangle, with the hypotenuse equal to $h^\prime$ and the other leg having length equal to half of the side length of the smaller square, or $7.5$. So, the Pythagorean Theorem can be used to find the height.
$h=\sqrt{12.5^2-7.5^2}=\sqrt{100}=10$
Finally, $V=\frac{1}{3}bh=\frac{1}{3}(225)(10)=\boxed{750}$.