$(A)$ $CO _2(s) \rightarrow CO _2(g)$
It is just a phase transition (sublimation) as no chemical change has occurred. Sublimation is always endothermic. Product is gas, more disordered. hence $\triangle S$ is positive
$(B)$ $CaCO _3$ (s) $\rightarrow CaO$ (s) $+ CO _2$ $(g)$
It is a chemical decomposition, not a phase change. Thermal decomposition occur at the expense of energy, hence endothermic. Product contain a gaseous species, hence, $\triangle S>0$.
$(C)$ $2 H \rightarrow H _2$ $(g)$
A new $H - H$ covalent bond is being formed, hence, $\Delta H < O$. Also, product is less disordered than reactant, $\triangle S <0$.
$(D)$ Allotropes are considered as different phase, hence $P_{\text {white,solid) }} \rightarrow P _{\text {red,solid }}$ is a phase transition as well as allotropic change.
Also, red phosphorus is more ordered than white phosphorus, $\Delta S <0$.