Hi, It is not possible to make it both ways by train ,you can look back at my previous answer to this question.I have covered all the possibilities.
You can always go to a beach !! As it your first time in Palma you can easily spend the day in this beautiful city.
If you look back you will see all the things I have recommended, walks, sights and restaurants.
Roger b