I still don't understand how to caluculate the number of electrons in the p-orbital. Where do the other two electrons come from to make it three

You need to be more specific. Which two electtrons from where? and to make what three.

there are three orbitals and each can hold 2, opposing charges. So the p orbitals can hold up to 6.....

To understand the number of electrons in a p-orbital, let's first discuss the basics of electron configuration.

In an atom, electrons occupy different energy levels or shells, represented by the principal quantum number (n). Each shell consists of one or more subshells, which are further divided into orbitals. Orbitals are regions of space where there is a high probability of finding an electron.

The p-orbital is a specific type of subshell within the second (n=2) and higher energy levels. It consists of three orbitals, designated as px, py, and pz, which are aligned along the x, y, and z axes, respectively.

According to the Pauli exclusion principle and the Aufbau principle, each orbital can hold a maximum of two electrons, and before filling higher-energy orbitals, each lower-energy orbital must be filled.

Now, the question is why are there three orbitals in a p-subshell, even though each orbital can only hold a maximum of two electrons?

The answer lies in the concept of degeneracy. Degeneracy refers to the equal energy levels of the orbitals within a subshell. In other words, the three p-orbitals have identical energies, making them degenerate. These orbitals exist so that electrons with the same energy can occupy them without violating the Pauli exclusion principle.

In summary, while each p-orbital can only hold two electrons, the p-subshell itself contains three orbitals due to degeneracy. Therefore, a p-subshell can accommodate up to six electrons (2 electrons per orbital x 3 orbitals).