Step 1: Check equation (A).
We know that enthalpy is defined as
\[
H=U+PV
\]
Rearranging,
\[
U=H-PV
\]
Hence, equation (A) is correct.
Step 2: Check equation (B).
Gibbs free energy is defined as
\[
G=H-TS
\]
where
\[
H=\text{enthalpy},
\]
\[
T=\text{temperature}
\]
and
\[
S=\text{entropy}
\]
Therefore, equation (B) is also correct.
Step 3: Check equation (C).
According to the first law of thermodynamics,
\[
\Delta U=q+w
\]
where
\[
\Delta U
\]
represents the change in internal energy, not the total internal energy itself.
Thus,
\[
U=q+W
\]
is incorrect because the correct relation should be
\[
\Delta U=q+w
\]
Hence, equation (C) is incorrect.
Step 4: Final conclusion.
Therefore, the correct equations are
\[
(A)\ \text{and}\ (B)\ \text{only}
\]
Hence, the correct answer is
\[
\boxed{\text{A and B only}}
\]