Now apply the rule to complete sentences.
جَلَسَ الْوَلَدَانِ أَمَامَ الْمُعَلِّمِ
→ الْوَلَدَانِ جَلَسَا أَمَامَ الْمُعَلِّمِ
The dual subject moves first, so the verb becomes dual.
نَصَرَ الْمُسْلِمُونَ إِخْوَانَهُمْ
→ الْمُسْلِمُونَ نَصَرُوا إِخْوَانَهُمْ
The masculine-plural subject moves first, so the verb becomes masculine plural. The object remains the object.