If we shine a prism with white light we get the light spectrum.I am interested what will happen if we block all the formed spectral components but the yellow light and let the yellow pass through another prism.Will this yellow light divide and split into red and green light again?If yes why light didn't decide on first prism to form just green and red?
No, the yellow light will not split into red and green light. When you block all of the spectrum except yellow, only the 580nm(yellow) wavelength remains. This cannot further split and become 700nm(red) and 530nm(green) light.
The association that red + green = yellow is just an act of the brain. Our eyes have 3 types of cone cells which 'light up' in different intensities in response to a wave in the visible spectrum hitting the eye. When RED and GREEN are simultaneously shown, the cones fire in the same intensity as it would have in response to YELLOW light.
You can verify this- load a yellow screen on your computer. Then take a magnifying lens and look at the screen. You will see that there are no YELLOW LEDs in the display. It is just the RED and GREEN LEDs firing simultaneously.
If we shine a prism with white light we get the light spectrum.
Let's remember what happens in detail. Polychromatic light is a stream of photons with different wavelengths. At the boundary between two media - in your example between air and glass - these photons are deflected (in the case that the beam hits the glass between zero degrees and the total reflection angle). The deflection angle is different for each wavelength. High-energy photons are deflected less than low-energy photons.
... if we block all the formed spectral components but the yellow light and let the yellow pass through another prism. Will this yellow light divide and split into red and green light again?
Since the duality of wave and particle behavior of light has been established, it is not wrong to use both properties for one's thoughts. The photon is an indivisible unit from its emission (from the subatomic particles, often electrons) to its absorption. From a superficial point of view, the photons from your beam pass through air and glass undisturbed. At second glance we should agree that air and glass are not 100% transparent.
The photons from your beam interact with the air molecules and the glass molecules. In any interaction with absorption and re-emission in the air or glass, the emitted photon has less energy than the previous one. (And the air and the glass are heated.) As a result, a general redshift occurs. If you perform your experiment with yellow in series, you will get a redshifted result.