The correct equation that shows the conservation of mechanical energy for the system where a marble is attached to a compressed horizontal spring and is then released is:
\[ \frac{1}{2}mv^2 = \frac{1}{2}kx^2 \]
This equation states that the kinetic energy of the marble (\(\frac{1}{2}mv^2\)) is equal to the potential energy stored in the spring when it is compressed (\(\frac{1}{2}kx^2\)) at the point of maximum compression. Hence the response:
\[ \frac{1}{2}mv^2 = \frac{1}{2}kx^2 \]
is the correct choice for showing the conservation of mechanical energy in this system.