does it work?
It took energy to lift the basketball and tennis ball into the air. As you held the balls, they had potential energy. Potential energy is stored energy. When you let go, the balls now had kinetic energy. Kinetic energy is moving energy.
So which ball had more potential energy? The basketball, because it was heavier and took more energy to lift.
So why did the tennis ball bounce so high? The large kinetic energy from the basketball was transferred to the small tennis ball, causing it to bounce much higher than it would have alone. You might think of it as getting an extra "push" from the basketball.