Internal Energy Definition, Why is dU zero when dT is zero?
The second term in each of your two equations can be expressed solely in terms of the equation of state for the solid, liquid, or gas:$$\left(\frac{\partial U}{\partial V}\right)_T=-\left[P-T\left(\frac{\partial P}{\partial T}\right)_V\right]$$$$\left(\frac{\partial H}{\partial P}\right)_T=\left[V-T\left(\frac{\partial V}{\partial T}\right)_P\right]$$
In the case of an ideal gas, the right hand sides of both these equations are equal to zero.