They have the same velocity because their displacements (shortest line from point A to point B, which is a straight line) are the same and they meet at the same time.
1 astronomical unit 1 AU = 1.4960 * 10^11 meters
it is the average distance between earth and sun
mercury to sun distance is = 46,000,000 * 1000 meters
= 4.6 * 10^9 meters = 4.6 * 10^9 / 1.4960 * 10^11 AU
= 3.0.74 / 100 = 0.0374 AU