I'm having trouble understand the answers to this question

I understand that there's 1 designated port per segment, but why is port Fa0/0 on switch B the designated port, and not Fa0/0 on switch A? Both ports are on the same segment, and they are equal distance from the root bridge.