Step-by-step explanation:
A p-orbital contains three atomic orbitals. Each atomic orbital can hold only two electrons, therefore, in total a p-orbital can hold up to six electrons.
As we are having only three electrons, so firstly each electron will enter each atomic orbital. Hence, there will be one electron per orbital. Later on, 3 more electrons can be filled in the same order.
Thus, we can conclude that the electrons are linearly distributed into the three orbitals.