Hi.
for the first condition
x = a1t2/2
d1-x=a1t2+a2t2/2
d1=3a1t2+a2t2/2
similarly for the second condition
d2=3a2t2+a1t2/2
d1/d2=a2+3a1/a1+3a2
(since you have not given the options I have stopped here, you can get the answer in the desired form using the result derived above. If you still have trouble nudge me!)