The marathon - it's doable, I came down by train last year, arrived in enough time for the middle wave. Will be doing the same this year and there's usually a couple of people so you can share a cab.
To get home you can either get a taxi or the (hourly?) bus to Petersfield station. It may be cheaper to get a return ticket to Havant where the two train lines join as this means you can come down on one line (Victoria to Arundel) and return on another ( Petersfield to Waterloo). I've generally been lucky enough to get offers of lifts from lovely folk such as the frog above to the station.
Holly - I've just realised you are doing the half. Should be pretty straightforward getting a cab from Petersfield and you are unlikely to be alone.
The race hasn't always filled up very quickly but has been featured in RW which does tend to speed things up. I've done it since 2008 and it's one of my favourites. weather is usually great too.