With digital calendars, I just set a reminder 5 minutes before all my meetings. Whether it starts at 10:30, 10:35 or 10:47, I will always have time pee or grab a snack or prepare the meeting or even all of that.
Alternatively, tell the people in meeting B that you will be 5 minutes late. Lateness communicated in advance is far less disruptive than unannounced lateness.
If neither of those are possible, reschedule one or the other meeting.
If it's impossible to reschedule either meeting, and this happens a lot, then there's a larger problem.