Hello, and welcome to FMH!

I would write the ODE as:

\(\displaystyle \frac{\pi}{k}(x-2a)\,dx=dt\)

Integrating, we then get:

\(\displaystyle \frac{\pi}{2k}x\left(x-4a\right)=t+C\)

Now, using the given point \((t,x)=(T,0)\) we get:

\(\displaystyle 0=T+C\implies C=-T\)

And so we have:

\(\displaystyle \frac{\pi}{2k}x\left(x-4a\right)=t-T\)

Next, using the given point \((t,x)=(0,a)\) we get:

\(\displaystyle \frac{\pi}{2k}a\left(a-4a\right)=-T\)

Solving this for \(k\), we obtain:

\(\displaystyle k=\frac{3\pi a^2}{2T}\quad\checkmark\)