You can go by train from Bath to Chepstow but it involves a change and can take 2 hours. You can also go by bus from Chepstow to Tintern to see the ruins of the Abbey in the beautiful Wye Valley. Train schedules here:> www.nationalrail.co.uk
To find buses:> www.transportdirect.info
However, I reckon you will see far more with less travelling by going direct to Cardiff form Bath > trains every hour & takes 1 hour. Yes, Wales does have some stunning countryside but not really around Cardiff although it is nice enough. About 35 miles N of Cardiff is the Brecon Beacons National Park but that is best reached by car - in about 40 minutes via the A470 expressway. But, I would suggest that by being based in Cardiff, that you would have plenty to occupy 2 days. (try & avoid Sundays as less buses).
Day 1 = Bus 32/320 to St.Fagans = the first village W of Cardiff. Visit (free) - www.museumwales.ac.uk/stfagans
(Be sure you know times of return buses & note that if using the village stop - use the one on Cardiff Road rather than outside the Church. Electronic signs in the car park bus stop tell you when they go). Anyway, to see St.Fagans Castle & grounds will half a day including journey from city (about 18 minutes). On return to city, get off at first stop after river and go to Cardiff Castle = www.cardiffcastle.com
Having done the Castle, wander around the city centre = modern malls & old arcades or go to www.museumwales.ac.uk/cardiff (closed Mondays).
Day 2 = take train (17 minutes) from either Central or Queen Street to Caerphilly. Caerphilly is not particularly attractive but the medieval castle certainly is worth seeing.http://cadw.wales.gov.uk/daysout/caerphilly-castle/?lang=en
Now, you could return on the train to Cardiff - and if so, you could go straight to Cardiff Bay with 1 change at Queen Street. However, you may wish to see Castell Coch which is just above the village of Tongwynlais in north Cardiff. Frequent buses (Stagecoach 26) go from Caerphilly to Tongwynlais from which it is about a 15 minute walk up to the Castle.http://cadw.wales.gov.uk/daysout/castell-coch/?lang=en Having done Castell Coch, back to Cardiff by bus.
From Cardiff Centre, bus 6 (every 10 minutes) does a loop that includes Cardiff Bay. http://www.cardiffharbour.com
If you want to go on guided tours further afield, consider > www.seewales.com
If going back to London /Heathrow from Cardiff, train fares are cheaper by advance booking. The train company is > www.firstgreatwestern.co.uk