Solve the equation $(6-x)^x=x^{6-x}$
My attempt
I put $f(x)=(6-x)^x-x^{6-x}$ and $\operatorname{Dom}f=(0,6)$.
I calculated that $f(2)=f(3)=f(4)=0$
How can I prove that $2,3,4$ are the only solutions to the equation? I assume that I have something to do with the derivative: $$f^\prime(x)= (6 - x)^x \left(\log(6 - x) - \frac x{6 - x}\right) - x^{6 - x} \left(\frac{6 - x}x - \log x\right)$$


My new attempt is the following:
Let $g(x)=(6-x)\log x-x\log(6-x)$ equivalent to $f(x)$. Then
$$g^\prime(x)=-\log x+\frac{6-x}x-\log(6-x)+\frac x{6-x}$$ $$g^{\prime\prime}(x)=\frac{-2(x^3-9x^2-18x+108)}{x^2(6-x)^2}$$
$g^{\prime\prime}(x)>0$ for $3<x<6$ and $g^{\prime\prime}(x)<0$ for $0<x<3$.
$3$ is a minimum for $g'$. So, for the monotoneity of $g'$ and for IVT,
$$g'(2)>0,g'(3)<0\implies \exists z_1:g'(z_1)=0$$ $$g'(3)<0,g'(4)>0\implies \exists z_2:g'(z_2)=0$$
I calculated that $g(2)=g(3)=g(4)=0$. $z_1, z_2$ are respectively a maximum and a minimum for $g$:
$g$ is increasing in $(z_2,6)$
$g(2)=0<g(z_1)$ because $2<z_1$ and $g$ is increasing.
$g(z_1)>0>g(z_2)$ because $z_1<z_2$ and $g$ is decreasing.
There exists only one number between $z_1$ and $z_2$ s.t. $g=0$, that is $3$
There exists only one number between $z_2$ and $6$ s.t. $g=0$, that is $4$
Then $2,3,4$ are the only solutions of $g$ and $f$.