Newport is a major town and station itself.
So there would be no issue getting a taxi from there, especially if pre booked.
Looking at the map and at Traveline Cymru- if you were doing the journey by onward bus you would change at Newport for the 45 minute bus journey on route #56 or #151- cost £4.70.
Newport is the physically closer of the two alternatives for both taxi and public transport.
Via Cardiff there is a train to Pengam station on the Bargoed line, then a 1.5 mile walk or pre booked taxi ride.
There are also regular buses route #26 from Cardiff, and route #27 from Bargoed Interchange.