The number of electrons in an atom's outermost (valence) shell is what fixes its group, and the group is what fixes whether it gains, loses, or simply sits at a certain physical state. Work each part off the valence-shell configuration, not off memorised element names.
(a) An element with five electrons in the outer shellGroup $\displaystyle 15$ (the nitrogen family — N, P, As, Sb, Bi) has the general valence configuration \(\displaystyle ns^2\,np^3 \), where \(\displaystyle n \) is the outermost shell number, \(\displaystyle s \) and \(\displaystyle p \) name the subshells, and the superscripts count electrons in each. Adding the superscripts, \(\displaystyle 2+3=5 \), so every member of this group carries five electrons in its outer shell.
Nitrogen is the clearest example: \(\displaystyle Z=7 \), configuration \(\displaystyle 1s^2\,2s^2\,2p^3 \). Its outermost shell (\(\displaystyle n=2 \)) holds \(\displaystyle 2s^2\,2p^3 = 5 \) electrons.
(b) An element that would tend to lose two electronsThis is a Group $\displaystyle 2$ element (the alkaline earth metals — Be, Mg, Ca, Sr, Ba), general configuration \(\displaystyle ns^2 \). An atom loses electrons when doing so gets it to the nearest noble-gas configuration cheaply — and for these elements that means shedding just the two \(\displaystyle ns^2 \) electrons.
Take calcium: \(\displaystyle Z=20 \), configuration \(\displaystyle 1s^2\,2s^2\,2p^6\,3s^2\,3p^6\,4s^2 \). Losing the two \(\displaystyle 4s \) electrons leaves \(\displaystyle \text{Ca}^{2+} \) with the argon configuration \(\displaystyle 1s^2\,2s^2\,2p^6\,3s^2\,3p^6 \) — a filled shell, which is why the loss happens readily (Group $\displaystyle 2$ metals have low second ionisation enthalpies relative to what a further electron loss would cost). Metals lose electrons; the mistake to avoid is reaching for a non-metal here because the question says "lose."
(c) An element that would tend to gain two electronsThis is a Group $\displaystyle 16$ element (the oxygen family — O, S, Se, Te), general configuration \(\displaystyle ns^2\,np^4 \). With six electrons already in the valence shell, only two more are needed to complete the octet, so these atoms gain electrons rather than lose them — the opposite pull from part (b).
Oxygen illustrates it: \(\displaystyle Z=8 \), configuration \(\displaystyle 1s^2\,2s^2\,2p^4 \). Gaining two electrons gives \(\displaystyle \text{O}^{2-} \) with configuration \(\displaystyle 1s^2\,2s^2\,2p^6 \), the neon configuration. The rule of thumb: elements with $\displaystyle 1$–$\displaystyle 3$ valence electrons (metals, left side) lose electrons; elements with $\displaystyle 5$–$\displaystyle 7$ valence electrons (non-metals, right side) gain electrons — both moving toward the nearest noble gas.
(d) The group with a metal, a non-metal, a liquid, and a gas togetherThis is Group $\displaystyle 17$, the halogens: F, Cl, Br, I, At. Down this one group, physical state changes steadily with increasing atomic size and strengthening interatomic forces:
Fluorine (\(\displaystyle F_2\)) and chlorine (\(\displaystyle Cl_2\)) — gases at room temperature
Bromine (\(\displaystyle Br_2\)) — a liquid at room temperature (the only non-metal liquid halogen)
Iodine (\(\displaystyle I_2\)) — a solid, but still a non-metal
Astatine (At) — highly radioactive and short-lived, but the element at the bottom of the group where metallic character (a general trend as you go down any group) becomes strong enough that At is regarded as having metallic properties
So Group $\displaystyle 17$ alone spans gas, liquid, non-metallic solid, and metal — no other group covers all four states across its members. The aside worth flagging: it is tempting to look for this variety across a
period instead of a
group, because state usually feels like a period-driven property; here it is the group that supplies the full spread.
Answer: (a) Nitrogen family, Group $\displaystyle 15$ (e.g., N: \(\displaystyle 2s^2 2p^3\), $\displaystyle 5$ outer electrons); (b) Group $\displaystyle 2$ alkaline earth metals (e.g., Ca, config \(\displaystyle ns^2\), loses $\displaystyle 2$ e⁻ to reach noble-gas configuration); (c) Group $\displaystyle 16$ oxygen family (e.g., O, config \(\displaystyle ns^2np^4\), gains $\displaystyle 2$ e⁻ to complete octet); (d) Group $\displaystyle 17$, the halogens — F and Cl are gases, Br is a liquid, I is a non-metallic solid, and At shows metallic character.