what two metals that will not generate hydrogen gas when treated with an acid?

There are more than two. Pick any metal BELOW hydrogen in the activity series of metals. Metals above will displace H from an acid; metals below will not.

http://www.files.chem.vt.edu/RVGS/ACT/notes/activity_series.html

To determine which two metals will not generate hydrogen gas when treated with an acid, we need to consider the reactivity series of metals. The reactivity series ranks metals based on their tendency to react with acids and other substances.

Metals above hydrogen in the reactivity series will react with acids and displace hydrogen gas. Metals below hydrogen in the reactivity series will not react with acids and therefore will not produce hydrogen gas.

The two metals that will not generate hydrogen gas when treated with an acid are gold (Au) and platinum (Pt). These metals are very unreactive and are placed below hydrogen in the reactivity series.

To remember this, you can use the mnemonic "Highly Active Metals Neutralize Long before Platinum And Gold" or "H.A.M.N.L.B.P.A.G". This acronym lists the metals in decreasing reactivity, from highly active to least active.

So, gold (Au) and platinum (Pt) are the two metals that will not generate hydrogen gas when treated with an acid due to their low reactivity.