The logic in the second problem is exactly the same as the one in the first problem. The lone pairs of nitrogen a and b are conjugated with the ring. The lone pair of nitrogen d is conjugated with the carboxyl group. However, the lone pair of nitrogen c is not conjugated with anything. Since conjugation decreases electron density on the nitrogens, they have less drive to share those electron. Remember that atoms want to be electronically neutral, and high electron density is what makes an atom good nucleophile.
Back to the OP's question, finding the most acidic hydrogen is pretty much similar in concept as these problems. My Ochem professor always told me to look at the conjugate base structures and see which is more stable. More stable conjugate base has stronger acid. Generally, stable means weak in acid/base chemistry.
For example, if you have CH3COOH vs PhCOOH. You should look at their conjugate bases which are CH3COO- vs. PhCOO-. The negative charge on CH3COO- is not delocalized as much as PhCOO-. Therefore, PhCOO- is more stable (weaker) base, so its conjugate acid PhCOOH is stronger than CH3COOH.