This question has options. Is the word "beg" used in the same way in the following two sentences?

I beg your pardon. I didn't mean to cause offence.

I begged for her to do it.

OPTIONS:
[1]. different meanings;
[2]. the same meaning;
[2].