Two towers A and B are located a distance d apart. A projectile is launched from the top of Tower A (height 30m) to land on the top of Tower B (height 50m). If the launch speed is 40m/s and the angle of projection is 45∘, find the horizontal distance d between the towers. (Take g=10m/s2)