Is it true that a p electron cannot have a magnetic quantum number equal to -2?

Is it also true that for the hyfrogen atom, a 3d orbital is of higher energy then a 4s orbital?

"p" is an orbital angular momentum quantum number designation. It has a magnetic dipole moment associated with it. Its value is 1 for all p orbitals. Its component along any axis can be +1, 0 or -1. Magnetic spin is a separate quantum number, and its value is 1/2 for all electrons, with components that must be either + 1/2 or -1/2 along any axis.

For hydrogen atoms, energy depends only upon the principle quantum number n, which is the number preceding the s, p, d.. etc. The higher the principal quantum number, the higher the energy. A 4s orbital thus has more energy than a 3d.

To determine if a p electron can have a magnetic quantum number equal to -2, we need to understand the allowed values for the magnetic quantum number (m). The magnetic quantum number specifies the orientation of an electron's orbital in space. For a p orbital, which has three different orientations along the x, y, and z axes, the allowed values of m are -1, 0, and 1. Therefore, a p electron cannot have a magnetic quantum number of -2. That statement is true.

Regarding the energy comparison between a 3d orbital and a 4s orbital in a hydrogen atom, it is important to consider the order of filling orbitals according to the Aufbau principle. According to this principle, electrons will occupy orbitals in order of increasing energy.
In the case of hydrogen, the 3d orbital has higher energy than the 4s orbital. This is due to the difference in shielding effect between the 3d and 4s orbitals. The 3d orbital experiences more shielding from the inner electrons, which increases its energy level compared to the 4s orbital. Therefore, the statement that a 3d orbital is of higher energy than a 4s orbital in a hydrogen atom is indeed true.