Problems 44260 and 44261 work with a monomial representation of multivariate polynomials. This has two parts, a matrix exponents with a row of exponents for each monomial, and a column vector coefficients with a coefficient for each monomial.
It would be nice to define polynomials so they can be multiplied using simple notation:
p = p1*p2;
p = mPoly(exponents, coefficients)
and a method mtimes for multiplying two polynomials. You can assume that the polynomials being multiplied have the same number of variables.