The spring loaded grey rod is initially held back by a latch. The red ball on the left has a small hole that fits over the end of the rod, but it is able to slide off when the rod moves forward. The red ball on the right sits lightly on top of the black platform and gets pushed off of the platform when the rod moves forward. So, when the latch is disengaged the rod moves forward releasing the ball on the end and pushing the other ball off of the black platform. Both balls start at the same height.
The bottom line? The x-axis and the y-axis are independent of each other!