draw v-t graph
let v be max velocity attained by it
area under v-t curve gives distance travelled
therefore
s1=1/2 * v * t1
s2=1/2 * v* t2
add both
s=s1+s2=1/2*v(t1+t2)=v/2*3 =3v/2 .........[1]
{as t1+t2=3}
now using
equation of motion
v-0=2t1
and
0-v=-4t2
simplify
we get t1=v/2 and t2=v/4
add both t1+t2=3v/4
As t1+t2=3 therefore 3v/4=3 ,hence v=4
put v=4 in eqn [1]
we get distance = {3*4)/2=6m
rate if useful