[tex]ax-x^2=x(a-x)=0\implies x=0,x=a[/tex]
which means the parabola [tex]y=ax-x^2[/tex] intersects the x-axis at [tex]x=0[/tex] and [tex]x=a[/tex]. Assume [tex]a>0[/tex].
Then the volume of the solid generated by revolving the region about the x-axis is
[tex]\displaystyle\pi\int_0^a(ax-x^2)^2\,\mathrm dx=\dfrac{\pi a^5}{30}[/tex]
Revolving about the y-axis, the volume would be
[tex]\displaystyle2\pi\int_0^ax(ax-x^2)\,\mathrm dx=\dfrac{\pi a^4}6[/tex]
The volumes are the same independent of which axis is taken as the axis of revolution, so
[tex]\dfrac{\pi a^5}{30}=\dfrac{\pi a^4}6[/tex]
We're assuming [tex]a>0[/tex], so we can safely divide both sides by [tex]\dfrac{\pi a^4}6[/tex] to get [tex]a=5[/tex].