If you were comparing two displacements for vi = 0, then you could use proportional thinking:
d = 1/2 a t2 so d goes with a and t2 . If 1st case is 1 and 2nd case is 2 then
d2/d1 = (a2/a1)(t2/t1)2 would apply (but this analysis doesn't seem to apply)
However, I am reading this as d1 = 1/2(2A)(3T)2 = 9AT2 and vf1 = 2A(3T) = 6AT
d2 = vf1t2 + 1/2 (a2)(t2)2 or 6AT*2T + (1/2) (4A)(2T)2 = 20AT2
d = d1+d2 = 29AT2