Hi Wowenglish, The use of 'have some nerve + VERBing", as in sentence 1, is basically a fixed sort of way for the speaker to say that someone else has behaved rather brazenly in a particular situation. Your second sentence might possibly be used the same way, but I'd say that "have some nerve to VERB" is probably more likely to simply be used to mean 'have some/the courage to do something'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.