German trains aren't cheap, though sometimes you can get better fares. If you have to take an intercity or ICE train, you are going to pay more. Check the Die Bahn website
www.diebahn.com for train fares on different connections. Look for the RB and RE routes (Regional bahn and Regional express) for longer but more economical options.
Is there anywhere your friends could pick you up? Sometimes the way the routes go, this is a cheaper, quicker option. For instance, to get from Frankfurt airport to our village took about 3 - 3.5 hours depending on the route, and cost 71 Euros. Taking the train to a town 25 minutes' drive away took two hours and cost 34 Euros. Check with your friends about the best train route and check out that website as well.