An experiment similar to Gilbert's, demonstrating that soft iron near a magnet becomes itself a temporary magnet, with polarity appropriate to attraction.
Each of the two nails touching the magnet becomes a temporary magnet, and therefore their free ends repel each other.