whenever you have say a multiplication of a binomial or any polynomial, you can simply multiply each term of one by the other's terms, namely
(a+b)*(c+d+e) => a(c+d+e) + b(c+d+e), and then add like-terms.
[tex]\bf \stackrel{length}{(6x+1)}\stackrel{width}{(3x+1)}\implies 6x(3x+1)+1(3x+1)\implies (18x^2+6x)~~+~~(3x+1) \\\\\\ 18x^2+6x+3x+1\implies \stackrel{\textit{adding like-terms}}{18x^2+9x+1}[/tex]