Regarding the maths olympiad, there are two different olympiads and as I read it, the point of the case revolved around that.
There is the UK maths olympiad paper aimed at A-level students, which is an open category, and there is also a specific girls' only competition. It's a measure to increase and improve female participation in mathematics, just like female-only sport. The student was eligible to sit the female-only paper and would have had a higher chance of getting a medal on that, so he wanted to enter the student for the female-only.
You will immediately grasp how this conflicted with the student's feelings around gender identity.
Note however, that it's been a long time since I sat an Olympiad paper or thought about one. I didn't do as well as I wanted on it!