In a paper titled "RAMANUJAN’S UNPUBLISHED MANUSCRIPT ON THE PARTITION AND TAU FUNCTIONS WITH PROOFS AND COMMENTARY" by Bruce C. Berndt and Ken Ono, it is mentioned that Ramanujan derived the formula \begin{align}\sum_{n = 0}^{\infty}p(25n + 24)q^{n} &= 5^{2}\cdot 63\frac{(q^{5};q^{5})_{\infty}^{6}}{(q;q)_{\infty}^{7}} + 5^{5}\cdot 52q\frac{(q^{5};q^{5})_{\infty}^{12}}{(q;q)_{\infty}^{13}}\notag\\ &\,\,\,\,+\,5^{7}\cdot 63q^{2}\frac{(q^{5};q^{5})_{\infty}^{18}}{(q;q)_{\infty}^{19}} + 5^{10}\cdot 6q^{3}\frac{(q^{5};q^{5})_{\infty}^{24}}{(q;q)_{\infty}^{25}}\notag\\ &\,\,\,\,+\,5^{12}q^{4}\frac{(q^{5};q^{5})_{\infty}^{30}}{(q;q)_{\infty}^{31}}\tag{1}\end{align} via the use of the formulas $$\frac{(q;q)_{\infty}^{6}}{(q^{5};q^{5})_{\infty}^{6}} = A^{5} - 11q + q^{2}B^{5}\tag{2}$$ and
$\dfrac{(q^{5};q^{5})_{\infty}}{(q^{1/5};q^{1/5})_{\infty}}$ $=\dfrac{(A^{4} + 3Bq) + q^{1/5}(A^{3} + 2B^{2}q) + q^{2/5}(2A^{2} + B^{3}q) + q^{3/5}(3A + B^{4}q) + 5q^{4/5}}{A^{5} - 11q + q^{2}B^{5}}\text{ (3)}$
and $$\sum_{n = 0}^{\infty}p(5n + 4)q^{n} = 5\frac{(q^{5};q^{5})_{\infty}^{5}}{(q;q)_{\infty}^{6}}\tag{4}$$
This is done by replacing $q$ by $q^{1/5}$ in $(4)$ and writing the formula as $$\sum_{n = 0}^{\infty}p(5n + 4)q^{n/5} = \frac{5}{(q;q)_{\infty}}\left(\frac{(q^{5};q^{5})_{\infty}}{(q^{1/5};q^{1/5})_{\infty}}\right)^{6}\frac{(q;q)_{\infty}^{6}}{(q^{5};q^{5})_{\infty}^{6}}$$ This effectively requires us to raise equation $(3)$ to $6^{\text{th}}$ power and then take the coefficient of $q^{4/5}$. I wonder how this leads to a beautiful result like equation $(1)$. If we use multinomial theorem to calculate $6^{\text{th}}$ power then it leads to a huge number of terms containing $q^{4/5}$ (42 terms and each term a polynomial in $A, B, q$) and I don't know if this can be done via hand calculation.
Is there is any other method to find the coefficient of $q^{4/5}$ or some alternative way to derive the complicated formula $(1)$?
Update: Here $A, B$ are given by $$A = \frac{(q^{2};q^{5})_{\infty}(q^{3};q^{5})_{\infty}}{(q;q^{5})_{\infty}(q^{4};q^{5})_{\infty}},\,\, AB = -1$$