A body which is uniformly retarded comes to rest in 10 s after travelling a distance of 20m.calculate its initial velocity

EASY WAY:

average speed = 20 meters/ten seconds = 2 m/s
so max speed = 4 m/s
HARD WAY
v = Vi + a t
0 = Vi + 10 a
a = -Vi/10
x = Vi t + (1/2) a t^2
20 = Vi (10) + a (100)/2
20 = 10 Vi - ( Vi/10) (100/2)
20 = 10 Vi - 10/2 Vi = 5 Vi
Vi = 4 m/s
both agree with oobleck

Distance (s): 20m

Initial velocity (u): ?
Final velocity (v): 0
Time (t): 10
S=(v+u\2)×t
20m=0+u\2×10
20m=0+5u
20m=5u
U=4ms^-1

S=(V-U/2)T

S=20
T= 10 seconds
V=0
U=?
20= (0-U/2)10
20= 0-10U/2
Cross multiply
40= -10u
Divide both sides
40/-10= -10U/10
U= -4
Since it is brought to retardation Acceleration due to gravity is positive
U= 4 ms-1

Please explain better

Please which formula are you using

Pls i need response for the question

v^2 = 2as

since a = v/10,
v^2 = 2(v/10)(20)
v = 4 m/s
check:
4*10 - 1/2 * 0.4*10^2 = 20

The physics question is not clear

Please what formula is that

how did you get 2a = -10?