Enter the BART station you're at and the one you want to go to, and it'll figure out how many stops you need to go backwards to get on the train going the right way in relative comfort.
Bookmark this on your phone.