Are you checking in at the airport? Ryanair check-in desks close exactly 40 minutes prior to departure, so I'd say that you are unlikely to make it. If you check in online you have to be at the gate no later than 10 minutes prior to departure (but Ryanair recommends 30 minutes).
On the way back, you're allowing 19 minutes between scheduled landing and train departure? Good luck!
You're cutting it very, very finely in both directions. You're mad.