Try getting through the castle with 2 Super Capes so that they'll be available during the Wendy battle. When fighting Wendy, I always stand on the middle pipe so I can easily reach any spot. If you're having trouble on avoiding the fireballs, try spin jumping on them if you can't find another way around them.