Head into the shop to the right of the Mysterious Stranger and talk to Mysterious Johnson. Once you've spoken with him, you'll find yourself in a room with a button that unleashes a ghost. Press it and talk to Mysterious Johnson again. Now you'll notice a bar labeled Ghost Shop, click it and either buy a ghost trap or grab the free one. Keep in mind that a worse trap means a lower chance of capturing a ghost. Equip it to your mecha, then go back to the Mysterious Stranger and select Ghost Hunt. (The ghosts are level 1 this way, versus level 6 if you trigger it while talking to Mysterious Johnson.) Fight the ghost until its life is low, then use the trap and hope for a catch. The free trap only has about a 20% catch rate, so I always go with the used one to avoid blowing money on the pricier traps.