LP=Lone pair
BP=Bond pair
To minimise the LP-LP repulsions(LP-LP > LP-BP > BP-BP repulsions), two axial places have to occupied, and one equatorial place will be occupied by the remaining LP.
Having two LPs in the equatorial position next to each other will cause more repulsion, since the angle of separation is just 90o as compared to 180o when they are in the axial positions
T-shaped is the right structure (distorted ofcourse)