Chemistry - PBP vs TBP geometry?
General Rule #1: Most elements use only s and p orbitals to form bonds, only transition elements and heavier elements use d, f, etc. orbitals in bonding.
General Rule #2: The more s-character in a bond the shorter the bond (reference). For example
- a $\ce{C(sp^3)-C(sp^3)}$ single bond length is ~ 1.54 $\mathrm{\mathring{A}}$
- a $\ce{C(sp^2)-C(sp^3)}$ single bond length is ~ 1.50 $\mathrm{\mathring{A}}$
- a $\ce{C(sp)-C(sp^3)}$ single bond length is ~ 1.46 $\mathrm{\mathring{A}}$
In an earlier SE Chem post, the structure and bonding in the trigonal bipyramid molecule $\ce{PCl_5}$ was discussed. The molecular hybridization is pictured below. The axial bonds are hypervalent (this concept is explained in the earlier post) and they are constructed from p orbitals. The equatorial bonds are constructed from $\ce{sp^2}$ orbitals. General Rule #2 suggests that the equatorial bonds will be shorter than the axial bonds since the equatorial bonds contain more s-character.
As the following structural diagram shows, this is indeed the case.
Now let's turn our attention to the pentagonal bipyramid structure as found in $\ce{IF_7}$ for example. Here is the structure for this molecule
As you noted in your question, the equatorial bonds are now longer than the axial bonds. Based on what we've discussed thus far, we might make an initial "guess" that in $\ce{IF_7}$ the axial bonds have more s-character than the equatorial bonds. As it turns out, this is correct.
Here is a link to an article discussing the structure and bonding in $\ce{IF_7}$. Only the abstract is freely available. For completeness, I'll mention that there was an earlier SE Chem question related to $\ce{IF_7}$, but it doesn't seem to add much to the conversation. Returning to the published abstract, the key part of the abstract states,
"These features can be explained, however, by a bonding scheme involving a planar, delocalized pxy hybrid on the central atom for the formation of five equatorial, semi-ionic, 6-center 10-electron bonds and an sp hybrid for the formation of two mainly covalent axial bonds."
The abstract tells us that the equatorial bonds are formed from the $\ce{p_{x}}$ and $\ce{p_{y}}$ orbitals; the axial bonds are formed from the $\ce{sp_{z}}$ hybrid orbitals (after using two p orbitals for equatorial bonding we are left with one $\ce{p_{z}}$ orbital and one s orbital on the central iodine, hence, when they combine two sp hybridized orbitals result). That is the answer to the question. As we guessed, there is more s-character in the axial bonds than the equatorial bonds. Hence, the axial bonds are now shorter than the equatorial bonds.
For completeness
Someone, after reading that last paragraph, is going to notice that there are 5 equatorial fluorines, but only 4 bonding sites with the two p orbitals - what gives? First off, note that the $\ce{p_{x}}$ and $\ce{p_{y}}$ orbitals on iodine form hypervalent bonds with the p orbital on fluorine and so yes, there are only 4 equatorial points of attachment. But note that the abstract also mentioned that the equatorial bonds are semi-ionic. This suggests that we have a resonance structure where we have an [$\ce{IF_{6}^{+}}$][$\ce{F^{-}}$] ionic contributor. We can draw 4 more resonance structures just like this for the other 4 equatorial $\ce{I-F}$ bonds. This means that mixed in with our hypervalent p-p bonds is some ionic character - this allows us to make 5 equivalent equatorial bonds. Said differently, our 5 equatorial bonds are all identical resonance hybrids obtained by mixing 2 hypervalent p bonds (each one providing bonding for 2 fluorines) with 1 ionic bond (providing bonding for 1 fluorine).