If I asked you to tell me the specific enthalpy or internal energy (that is, a measure of the energy available in the material per unit mass or moles) of the final material in each of the two examples below, would they differ? would you need more information?
While the answer to this question may notbe immediately obvious, hopefully the answer to an analogous question is: what is the corresponding final height (above sea level) of each of the following students?
Much like the student whose final height is unaffected by how (s)he got to the 12th floor, the amount of energy in each of the samples of methane (per unit mass or moles) is unaffected by its history. The specific energy and enthalpy are both state functions/variables whose value depends only on the (thermodynamic) state of the system, not on the path of how you got there. This is important for anumber of reasons, as we will see...
State Functions/Variables depend only on the thermodynamic state of the system (T, P, phase, chemical composition).
Define "state variable".