Given the equation $\ce{C3H8 + 5O2 -> 3CO2 + 4H2O}$ and that enthalpies of formation for $\ce{H2O (l)}$ is $\pu{-285.3 kJ/mol}$ and $\ce{CO2 (g)}$ is $\pu{-393.5 kJ/mol}$, and the enthalpy of combustion for the reaction is $\pu{-2220.1 kJ/mol}$, I need to find the heat of formation of propane.
My initial idea was to use Hess's law, and I got $[3(-393.5) + 4(-285.3)] - [-2220.1] = \pu{-101.6 kJ}$
I then doubted myself because Hess's law gives the $\Delta H^o_\text{rxn}$ which is different from the $\Delta H^o_\mathrm{f}$ for $\ce{C3H8}$ that we are trying to find.
So I used another approach using the individual equations for the formation of $\ce{H2O, CO2}$, and $\ce{C3H8 + 5H2O -> 3CO2 + 4H2O}$ and combining the equations to get the equation for the formation of $\ce{C3H8}$ (which is $\ce{3C + 4H2 -> C3H8}$). After manipulating the equations, I got $+2220.1 - 1141.2 - 1180.5 = \pu{-101.6 kJ}$.
I got the same answer, and I want to understand why Hess's law still works even though the equation I used in Hess's law had nothing to do with the formation of $\pu{1 mol}$ of $\ce{C3H8}$. I understand my second method, but why does the first method work?