As the diameter of the circle is on the x axis.so it's center doesn't have any $y$ co-ordinate.and as it's radius is $a$,we get the equation of the circle is-
$$ (x-a)^2+y^2=a^2...........(1)$$
the equation of the chord is $$y=mx.........(2)$$
solving equation (1) and (2) we get, $$(x,y)=(0,0) and \bigg(\dfrac{2a}{m^2+1},\dfrac{2am}{m^2+1}\bigg)$$
So ,the locus of the center of our required circle is $\bigg(\dfrac{a}{m^2+1},\dfrac{am}{m^2+1}\bigg)$ and the radius of the circle is $$\dfrac{\sqrt{\bigg(\dfrac{2a}{m^2+1}-0\bigg)^2+\bigg(\dfrac{2am}{m^2+1}-0\bigg)^2}}{2}=\dfrac{a}{\sqrt{m^2+1}}$$
Hence We can now make our required equation and that is-
$$\bigg(x-\dfrac{a}{m^2+1}\bigg)^2+\bigg(y-\dfrac{am}{m^2+1}\bigg)^2=\dfrac{a^2}{m^2+1}$$
After some simplification you will find that the equation become,
$$2a(my+x)=(m^2+1)(x^2+y^2)$$
