Maths Mechanics SUVAT mechanics

A train starts from rest at a station and after 30 seconds stops at the next station, 500m away.

If distance travelled in time T is given by, s = cT^2(k-T) where c and k are constants...

i) Find formulae for velocity and acceleration.

velocity:

v=s/t so, = cT(k-T) ???

acceleration:

s=ut + 1/2at^2

cT^2(k-T)=0 + 1/2at^2

a=2c(k-T) ???

ii)Use the fact that velocity is zero when T=30 to find value of k.

v=30c(k-30)=0

30ck=900c

k=30

iii)Use the fact that s=500 when T=30 to find c.

The problem here is the (k-T) part of every formula, where k and T are both 30, giving 0... suggesting that k shouldn't be 30?

Any and all help is greatly appreciated! Many thanks.