In order to get this star, you will require the use of the cannon, which means you will have to speak with the Bob-Omb Buddy first. This pink Bob-Omb is located at the top of the maze and usually requires you to do a bunch of Wall Jumps to reach it. So, make your way to the giant maze and head over to the Blue Coin Block. The wall here will be where you need to Wall Jump up to the top of the maze. It might take a few tries in order to get it right, but there is a spinning heart right next to the Blue Coin Block, in case you need to replenish your health. Once you’ve reached the top, speak with the Bob-Omb Buddy to open up the cannon.
As far as the location of the cannon, it is found on the flying ship, so you will need to return to the spinning platforms and use the flying carpet. Upon making it to the choice of two more carpets, make sure you pick the one that takes you to the flying ship, which was also done during Cruiser Crossing the Rainbow. Whenever you finally reach the ship, the cannon will be on the opposite end of the Power Star. The star will be located on the large island right by the rainbow ring and all you really need to do is aim for the center of the ring, with the vertical alignment being with the pole. Once you reach the island, avoid the Chuckya and break open the yellow box for the star.