From Bulbapedia, the community-driven Pokémon encyclopedia.
Later, Jessie, James, and Ash come across a meeting in the town square, where, assisted by Nurse Joy, Officer Jenny and her Audino, a real Beheeyem is directing the townsfolk to search for something that looks like the Amulet Coin that Ash found. When the brainwashed Iris and Axew notice the three eavesdroppers, Beeheyem flashes its lights, which Officer Jenny translates as an order to pursue them, forcing them to hide by jumping through a drain cap and running to a warehouse. There, they find Meowth again and learn about the flying saucer and the failed attempts to take the amulet-coin like object on his forehead. Ash wants to confront the Beheeyem and make them return everyone to normal, while Team Rocket plots to steal their technology for the Boss. Then, they find a box of Pokemon masks, and disguise themselves. However, a lady's umbrella knocks Ash's mask off, and they are forced to flee again.
They sneak aboard the spaceship, where
the Beheeyem take control of Meowth’s mind so they can speak through him. Through Meowth, they explain that their ship crashed and lost its power supply— which turns out to look like an Amulet Coin, and also like Meowth’s Charm. Ash offers the coin he found, but that’s not the one they’re looking for. James decides that if his “coin” is really a spaceship’s energy source, it’s much more valuable than he thought, so he isn’t interested in giving it up — until a helpful Thunderbolt from Pikachu sends the villains blasting off again and knocks the power supply into Ash’s hands.
Ash returns the missing piece to the Beheeyem, who repair their ship, change everyone back to normal, and fly away. He then meets up with Iris and Cilan, who have no idea whatsoever about what happened. But that's fine, cause everything is back to normal and Ash can continue his quest of becoming a Pokemon Master!