The 0839 train from Chippenham to Bath Spa arrives at 0853. The return fare is £7.10. (If you're prepared to cut it fine, the 0916 service arrives at 0930, allowing you to pay the Off-Peak return fare of £6.00). Those fares drop to £4.70 and £3.95 respectively if you've got a Senior Railcard.
There's a busy taxi rank at the front of the station. Based upon my own experience of running a rail station you'll probably not have to wait for a taxi at that time of day as the school run contract cabs should have finished their work by then.
If you'd rather pre-book a cab phone Abbey Taxis on 01225 444 444 or Bath Spa Taxis on 01225 313 131 .