Ways to tell in advance on which platform the U5 will be stopping at Berlin Hbf:
Beginner: Near the end, when you see a wall right next to the car with an orange cable on it, the exit will be on the opposite side.
Intermediate: Pay attention after the initial tunnel wall on the left runs out and you can see and/or feel a possible transfer of the tracks. Exit to the opposite side of transfer.
Advanced: The starting velocity at Bundestag will be considerably lower if there will be a transfer to the left-side track. Exit to right if this is the case.