This Seeking Tech guide will explain how you can beat the Ecto Gang boss in Astro Bot. Use the following video as a reference:
To start the boss fight, you need to jump on the switch. Afterwards, you need to shoot at the ghosts by pressing the R2 button. The flashlight will help freeze the ghosts, making them easier to target. You should keep the light pointed towards the middle in between every ghost appearance.
The first phase should be simple as there are only three possible spots for the ghosts to appear.
The second phase has four potential spots. There is also a fake cardboard cutout that may throw you off. Try to keep the flashlight pointed towards the vines in the middle and try to hit the ghosts quickly when they appear.
For the final phase, a fast-moving ghost will appear in one of eight potential spots. You should keep the flashlight pointed towards the middle again. The enemy should eventually appear in one of the four middle spots.