From the Super Mario Wiki
The Rec Room (Japanese: トレーニングルーム Training Room) is one of the many rooms from Luigi's Mansion. It is located in the third area.
The Rec Room is filled with exercise equipment such as a treadmill, weights, punching bags, and several other fitness machines. If Luigi runs on the treadmill for a bit, it spits out a key which can be used to unlock a door connecting the third area and second area. A Speedy Spirit is hiding in the fitness machine with the ladder attached to it.
Ghosts in the Rec Room during the blackout