the three kinematical equations
v = u + at
s = ut + 1/2 at2
2as = v2 - u2
have been derived ONLY for systems with constant acceleration. if in a question you are told that acceleration varies as a function of time/displacement, you cannot use this directly!