I know that $\delta(0)=1$, and $\delta(x)=0$ otherwise. So for the integral $\int_{-\infty}^{\infty}\delta(6-2x)x^2$, why can't you say that $\delta(6-2x)= \delta(0)$ at $x=3$, and therefore evaluating $x^2$ at $x=3$ you get 9? I know you have to do it by substitution. But why??
And how do you tackle a problem where the limits aren't $-\infty$ to $\infty$ and where there's a quadratic in the delta function? So
$\int_{0}^{\infty} \delta(x^2+x-6)x^2 = 0$?
The delta function of a function $f(x)$ is given by $$\delta(f(x))=\sum_{i=1}^n\frac{\delta(x-x_i)}{|f'(x_i)|}$$ where the $x_i$ are the roots of $f(x)$. So for $f(x)=x^2+x-6=(x+3)(x-2)$ we have $$ \delta(f(x))=\frac{\delta(x-2)}{5}+\frac{\delta(x+3)}{5} $$ $$ \begin{align} \int_{0}^{\infty} \delta(x^2+x-6)x^2 \mathrm d x &=\int_{0}^{\infty}\left(\frac{\delta(x-2)}{5}+\frac{\delta(x+3)}{5}\right)x^2\mathrm d x\\ &=\int_{0}^{\infty}\frac{\delta(x-2)}{5}x^2\mathrm d x\\ &=\int_{0}^{\infty}\frac{\delta(x-2)}{5}(2)^2\mathrm d x\\ &=\frac{4}{5}\int_{0}^{\infty}\delta(x-2)\mathrm d x\\ &=\frac{4}{5} \end{align} $$ observing that the point $-3$ is outside of interval of integration and then $\int_{0}^{\infty}\frac{\delta(x+3)}{5}x^2\mathrm d x=0$.
For $g(x)=6-2x$ we have $$ \begin{align} \int_{0}^{\infty} \delta(6-2x)x^2 \mathrm d x =\int_{0}^{\infty}\frac{\delta(x-3)}{2}x^2\mathrm d x =\int_{0}^{\infty}\frac{\delta(x-3)}{2}3^2\mathrm d x =\frac{9}{2}\int_{0}^{\infty}\delta(x-3)\mathrm d x &=\frac{9}{2} \end{align} $$