Answer
$f^{-1}(T)=\frac{g T^2}{4 \pi^2}$
Work Step by Step
Given $T=2 \pi \sqrt{\frac{l}{g}}$, we can solve of $l$ by first factoring both sides.
$$
\begin{aligned}
T^2 & =4 \pi^2 \frac{l}{g} \\
l & =\frac{g T^2}{4 \pi^2}
\end{aligned}
$$
Thus, $f^{-1}(T)=\frac{g T^2}{4 \pi^2}$. The is the length of the pendulum given that we know the period, $T$.