Suppose the numbers are $x, x, y$. Then $2 x+y=12$ meaning that $y=12-2 x$, and so the product is $p(x)=x^{2}(12-2 x)=12 x^{2}-2 x^{3}$. Since we must have $0<x<6$ we look for critical $\#$s in this range.
Since $p^{\prime}(x)=24 x-6 x^{2}=6 x(4-x)$, the only critical $\#$ of $p$ in that range is $x=4$, which is local max via the sign diagram for $p^{\prime}$. This means the maximum product is $p(4)=64$.