Ross's formula is correct, here is another derivation/proof.
Let's call all packs with a legendary a legendary pack, and all packs without a legendary a bad pack.
Let's say you just opened a legendary pack. The probability that the immediate next pack will be legendary, with zero bad packs in between, is $p$.
The probability that you will open 1 bad pack before getting another legendary is $(1 - p) * p$, ie the probability of getting a bad pack on the first pack, times the probability of getting a legendary on the second pack.
The probability of opening 2 bad packs before getting a legendary is similarly $(1 - p) * (1 - p) * p = (1 - p)^2 * p$.
More generally, for $i < n - 1$, the probability of opening exactly $i$ bad packs before getting a legendary is $(1 - p)^{i} * p$.
Then, the probability of opening exactly $n - 1$ bad packs before getting a legendary is $1$ minus the probability of opening fewer than $n - 1$ bad packs in a row, which is simply the sum of all probabilities with $i < n - 1$. So the probability of having exactly $n - 1$ bad packs is $1 - \sum_{i=0}^{n - 2}p * (1 - p)^{i}$.
Then, we compute the average number of bad packs we need to open to get a legendary. This is simply the sum of all possible numbers of bad packs we may need to open, times the probability of needing to open that many bad packs. Using our formulas above, the average number of bad packs you will need to open for one legendary is:
$[\sum_{i=0}^{n - 2}i * Pr(opening\ exactly\ i\ bad\ packs)] + (n - 1) * Pr(opening\ exactly\ n-1\ bad\ packs)$
$ = [\sum_{i=0}^{n - 2}i * p * (1 - p)^{i}] + (n - 1) * (1 - [\sum_{i=0}^{n - 2}p * (1 - p)^{i}])$
You can look up those sums, and plugging in their closed form solutions and using some algebra, reduce this to:
Average number of bad packs needed for one legendary = $\frac {1 - p - (1 - p)^n}{p}$
If you need to open $k$ bad packs on average for every 1 legendary pack, then the fraction of legendary packs you will tend to have is $\frac {1} {k + 1}$. Plugging in our formula for k above, the average fraction of legendary packs you will have is:
$\frac 1 {\frac {1 - p - (1 - p)^n}{p} + 1}$
which simplifies to
$\frac p {1 - (1 - p)^n}$
the same as Ross's formula.
As Ross hinted above, we can double check our formula's behavior for limiting cases. Plugging in $n = 1$ returns an average fraction of $1$, as we expect, since a pity timer of 1 means we get legendaries every time. Taking $\lim_{n\to\infty}$ gives us $p$, the value we'd expect if we had no pity timer at all. Plugging in $p = 1$ also gives $1$, as we would expect to get legendaries every time. You can also confirm that $\lim_{p\to0}$ returns $\frac1n$.