The correct equation that shows the conservation of mechanical energy for a system where a marble is attached to a compressed horizontal spring and then released is:
1/2mv^2 = 1/2kx^2
This equation states that the kinetic energy (1/2 mv^2) of the marble when the spring returns to its equilibrium position is equal to the potential energy stored in the compressed spring (1/2 kx^2) when it is fully compressed.