Here are my Prelim ranks. My school rank is 200ish
English Adv: 64/101
Math: 3/75
Math Ext: 2/25
Physics: 4/25
Economics: 2/25
Legal Studies: 8/75
SOR 1 unit: 13/102
the right hand side of the second line is: (h + q) (x - 2ah)
By expansion, that becomes: hx + qx - 2ah^2 - 2aqh
that can simplify to x(h + q) - 2ah^2 - 2aqh, which is the third line, right hand side :)