In trigonal biyramidal geometry (tbp), the lone pair of electron is located in equitorial position due to two reasons:-
1. The equitorial position has more s character than axial position. So in equitorial position, lone pair is much more attracted by nucleus (as s orbital is closer to nucleus), hence additional stabilization is gained.
2. You may use bent rule which states that lone pair prefers to stay in orbital where s character is more.
As for octahedral geometry, all bonds are identical. So no equitorial or axial position.