Your understanding of the expansion of the universe and the motion of planets is not accurate. Let's clarify these concepts:
Expansion of the Universe: The universe is indeed expanding, but it is not expanding at the speed of light. The expansion of the universe refers to the increasing distance between galaxies on large scales. This expansion is happening uniformly in all directions, causing the fabric of space itself to stretch. However, it is important to note that the expansion does not apply to local systems such as individual galaxies, star systems, or planets.
Gravitational Interactions: The reason planets stay in their orbits around stars is due to the gravitational interactions between celestial bodies. Gravity is a force that attracts objects with mass towards each other. In the case of planets orbiting stars, such as Earth orbiting the Sun, the gravitational attraction between the two bodies keeps them in a stable orbit.
The motion of planets is governed by the delicate balance between their forward motion, which tends to make them move away from the central body, and the gravitational pull of the central body, which keeps them in orbit. This balance results in stable elliptical orbits.
While the universe as a whole may be expanding, the force of gravity dominates on local scales, allowing planets to maintain their positions and orbits around stars. The expansion of the universe does not directly affect the gravitational interactions between celestial bodies within a galaxy or a star system.
It's important to note that the expansion of the universe is primarily observed on cosmological scales involving vast distances between galaxies. On smaller scales, such as within our solar system, the effects of the universe's expansion are negligible compared to the gravitational forces that govern the motion of planets and other celestial objects.