On the lap before, Glock did a 1.28, Hamilton was 1.19, and he was 15 seconds behind. With the rain getting heavier by the second, it's hardly surprising he caught/past him.
Having done Double Maths at A-level, if you're struggling with coordinate geometry I would suggest choosing a different course as it only gets harder (although, also more interesting/useful which might take some of the pain away).