How does this transistor work?
It's a multiple collector transistor, and in this application it's being used (as it often is in ICs) as a current mirror.  The Vbe drops of transistors Q20 and Q21 and resistor R6 set the current through the upper collector of Q22, and this current is then mirrored back down into Q20 by the lower collector.  It also sets the current through the long tail current source transistor Q11.