The enumerator of all partitions of number is $$ P(x)=\sum_n P_{n}x^{n} = (1+x+x^2+\ldots)(1+x^2+x^4+\ldots)(1+x^3+x^6+\ldots)\cdot\ldots\cdot(1+x^{k}+x^{2k}+\ldots)\cdot\ldots = \frac{1}{(1-x)(1-x^2)(1-x^3)\cdot\ldots\cdot(1-x^k)\cdot\ldots} $$ because when you pick up the $k$ number $i$ times to the partition of number then you take the $x^{ik}$ from the $k$-th bracket.
So in similar way we can create the second enumerator which has a form defined by the constraints given in your task $$ A(x)=\leftx^2(1+x^2+x^4+\ldots)+x^3(1+x^3+x^6+\ldots)+x^5(1+x^5+x^{10}+\ldots)\right(1+x^4+x^8+\ldots)(1+x^6+x^{12}+\ldots)(1+x^7+x^{14}+\ldots)(1+x^8+x^{16}+\ldots)\cdot\ldots = \left[\frac{x^2}{1-x^2}+\frac{x^3}{1-x^3}+\frac{x^5}{1-x^5}\right]\frac{1}{(1-x)(1-x^4)(1-x^6)\cdot\ldots\cdot(1-x^k)\cdot\ldots}=\frac{3x^{10}-2x^8-2x^7-x^5+x^3+x^2}{(1-x)(1-x^2)(1-x^3)\cdot\ldots\cdot(1-x^k)\cdot\ldots} $$ and now you can easily see that $$ B(x)=3x^{10}-2x^8-2x^7-x^5+x^3+x^2 $$