Most trains take around 1 hour 50 minutes to get from London (PAD) to Cardiff (CDF) travelling much of the way near 125 mph. It takes at least twice as long by bus with National Express and Megabus being the main scheduled carriers.
If you pre-book specific trains Advance tickets (not refundable) can be had for £29.50 each way per person or £19.45 if you have a Railcard. Note that the Senior Railcard is valid anytime but the Two Together one is not valid before 9.30am on weekdays. If you have the latter, work out where the first stop is after 9.30am & check prices for a return to that place (possibly Reading or Swindon) plus the prices from that point to Cardiff with the Railcard discount to compare how things work out.
Trains > https://www.nationalrail.co.uk (it will send you to GWR to book. Any problems - try the LNER website - even though they are not the London to Cardiff train company, you can still book via them and you would probably be using them for London to Edinburgh.
If you are going from London to Edinburgh by train, it will probably be worth you getting a Railcard(s). >
https://www.nationalrail.co.uk/tickets-railcards-and-offers/railcards/national-railcards/
Note that engineering work on the GWR mainline in June is taking place and you should avoid these dates in June:> 9, 10, 11, 12, 18 & 25. Also avoid dates when major events take place in Cardiff when trains will be crowded. See >https://www.principalitystadium.wales/events-and-ticket-information/
https://www.planetware.com/tourist-attractions-/cardiff-w-sg-cardiff.htm
Also avoid 17 May = Beyonce in the Principality Stadium and 21 July = Tom Jones in Cardiff Castle Green.