First, I didn't find a Mexican War Pension listed for either James or Francis McHugh. However, unless they were war related disabled, they would not be able to apply until 1887 and many did not live that long.
Therefore, I suggest you request from the National Archives the compiled military service record of James giving the information you listed here. If they don't find one, you won't be charged. Keep in mind the Mexican War was from 1846 - 1848 and the potato famine in Ireland wasn't unill 1846.