And when the punishment descended upon them, they said, "O Moses, invoke for us your Lord by what He has promised you. If you [can] remove the punishment from us, we will surely believe you, and we will send with you the Children of Israel."
Mā is a particle denoting the infinitive (maṣdariyya). The meaning is: "by the covenant You have with You," which is Prophethood.
The bāʾ (in bimā) relates to his saying: {ادع لنا ربك} (Call upon your Lord for us) in two ways:
"Grant us what we request of you regarding praying for us, by the right of the covenant of God and His honor that you possess through Prophethood," or "Call upon God for us, using the covenant you have with Him as a means of intercession."
It is an oath, the response to which is la-nuʾminanna (we will surely believe). That is: "We swear by the covenant of God that you possess, if You remove the plague from us, we will surely believe in you."
{إلى أجل هم بالغوه}
To a limit of time that they will inevitably reach. They will be punished at that time, and the respite previously granted to them will be of no benefit to them.
{فإذا هم ينكثون}
This is the response to lammā (when). It means: When We removed the punishment from them, they immediately committed treachery. They did not delay; rather, as soon as it was removed, they broke their promise.
{فانتقمنا منهم فأغرقناهم}
We intended to take vengeance upon them, so We drowned them.
{واليم}
The sea whose bottom cannot be reached. It is also said: It is the deep part of the sea and the bulk of its water. Its derivation is from al-tayammum (to intend/head toward), because those who seek help through it head toward it.
{فانتقمنا منهم فأغرقناهم}
Meaning: Their drowning was a consequence of their denial of the signs, their heedlessness regarding them, and their lack of reflection upon them.
Al-Aʿrāf: 137
{وأورثنا القوم الذين كانوا يستضعفون مشارق الأرض ومغاربها التي باركنا فيها وتمت كلمت ربك الحسنى على بني إسرائيل بما صبروا ودمرنا ما كان يصنع فرعون وقومه وما كانوا يعرشون}