I'll somewhat expound the Qiaochu Yuan's wonderful solution, and show that how it can be translated to algebraic expressions.
Second identity
We start from the second identity \begin{align} \prod_{i = 1}^\infty (1 + q^i x) = \sum_{n = 0}^\infty p^F_{n} x^n. \tag{1} \end{align}
Expanding the left hand side and comparing the coefficient of $x^n$, we find $ \sum_{1 \le a_1 < \dots < a_n} q^{a_1 + \cdots + a_n} = p^F_n, \tag{2} $ where the sum is carried over all the combinations of $a_1, \dots, a_n$, satisfying the condition $1 \le a_1 < \dots < a_n$.
Each term in the sum for $p^F_n$ can be represented by a Ferrers diagram, in which, there are $n$ rows, each with a different number $a_k$ ($1 \le k \le n)$ of dots. If the rows are labelled from bottom to top, a row with fewer dots lies below a row with more dots.
Now consider the change of variables \begin{align} b_k = a_k - a_{k - 1}, \end{align} with $a_0\equiv 0$, then the condition of $a_k > a_{k-1}$ becomes $ b_k \ge 1, $ for any $k = 1, \dots, n$. The inverse relation is \begin{align} a_1 &= b_1, \\ a_2 &= a_1 + b_2 = b_1 + b_2, \\ a_3 &= a_2 + b_3 = b_1 + b_2 + b_3, \\ \cdots \\ a_n &= a_{n - 1} + b_n = b_1 + b_2 + \cdots + b_n. \end{align} The sum on the exponent of the left hand side of (2) becomes $ a_1 + \cdots + a_n = n \, b_1 + (n-1) \, b_2 + \cdots + b_n. $ and (2) becomes \begin{align} p^F_n &= \sum_{b_1 \ge 1, \; b_2 \ge 1, \; \cdots, \; b_n \ge 1} q^{n \, b_1 + (n-1) \, b_2 + \cdots + b_n} \\ &= \sum_{b_1 \ge 1} q^{n \, b_1} \sum_{b_2 \ge 1} q^{(n - 1) \, b_2} \cdots \sum_{b_n \ge 1} q^{b_n} \\ &= \frac{q^n}{1-q^n} \frac{q^{n-1}}{1-q^{n-1}} \cdots \frac{q}{1-q} \\ &= \frac{ q^{n(n+1)/2} } {(1-q) (1-q^2) \cdots (1-q^n) }. \end{align}
This is the desired result.
First identity
The case for the first identity is similar \begin{align} \prod_{i = 1}^\infty \left[1 + q^i x + (q^i x)(q^i x) + (q^i x)(q^i x)(q^i x) + \cdots \right] = \sum_{n = 0}^\infty p^B_{n} x^n. \tag{3} \end{align}
Comparing the coefficient of $x^n$, we find $ \sum_{1 \le a_1 \le \dots \le a_n} q^{a_1 + \cdots + a_n} = p^B_n, \tag{4} $ Note that “$<$” is replaced by “$\le$” because of the $(q^i x)(q^i x), (q^i x)(q^i x)(q^i x), \dots$ terms. In terms of the Ferrers diagram, we now allow multiple rows with the same number of dots. For example, if we choose the term $(q^i x) (q^i x) (q^i x)$ for the $i$th factor, then there are three rows with $i$ dots in the Ferrer diagram.
Then, following the same procedure of changing variables, we now get the condition $ b_k \ge 0, $ for $k > 1$, and $b_1 \ge 1$. and \begin{align} p^B_n &= \sum_{b_1 \ge 1, \; b_2 \ge 0, \; \cdots, \; b_n \ge 0} q^{n \, b_1 + (n-1) \, b_2 + \cdots + b_n} \\ &= \sum_{b_1 \ge 1} q^{n \, b_1} \sum_{b_2 \ge 0} q^{(n - 1) \, b_2} \cdots \sum_{b_n \ge 0} q^{b_n} \\ &= \frac{q^n}{1-q^n} \frac{1}{1-q^{n-1}} \cdots \frac{1}{1-q} \\ &= \frac{ q^n } {(1-q) (1-q^2) \cdots (1-q^n) }. \end{align} Q.E.D.