Cochem to see the Castle
nearby Rhine Valley (St Goar and Bacharach)
Baden-Baden or Mosel Valley instead?
From FRA travel to St. Goar and use it as a travel base for a few days - it's more central to the area where you will be sightseeing than Bacharach.
From St. Goar there are 4 castles you could visit and tour:
Rheinfels (ruins and museum, right in St. Goar)
Marksburg (fully intact medieval castle just across the river and north of St. Goar in the town of Braubach)
Burg Eltz (also intact, set deep in the forest near Moselkern train station - walk around an hour from there to the castle, or use bus on weekend.)
Reichsburg (right in Cochem)
Bacharach is about 10 minutes south of St. Goar by train. Do pay the town a visit. It has very nice old-world buildings and a castle as well but tours are not possible as the interior has been converted into a youth hostel.
From St. Goar, all the towns and castles named above (except Bacharach) can be reached by VRM mini-group day pass or 3-day pass. These passes are valid for the bus to Eltz on weekends as well.
Should you move over to the Mosel for some time there? It's up to you. If you have the time, absolutely. Cochem is a good base - you could do your day trip to Eltz castle from there and a day trip to TRIER as well (which is really too far from a Rhine base like St. Goar.) The Rheinland-Pfalz Ticket (day pass) is the one to use for a day trip to Trier.
Baden-Baden is a particularly weak base town for exploring. The station lies well outside town and requires a bus ride every time you leave and return. It's a sort of OK place if you're into spa treatments and casinos - generally you can do better on your way toward southern Germany by routing yourselves via Würzburg and Nuremberg, nice cities with lots of nice towns to explore nearby.