Identify the group before explaining the change.
● أَمَرْتُهُ أَنْ يَذْهَبَ: first group; final dammah becomes fatḥah.
● إِنَّ اللَّهَ يَأْمُرُكُمْ أَنْ تَذْبَحُوا بَقَرَةً: second group; the inflectional nūn is removed.
● نُرِيدُ أَنْ نَتَعَلَّمَ: first group; final dammah becomes fatḥah.
● يُرِيدَانِ أَنْ يَكْتُبَا: the dual verb after أَنْ loses its inflectional nūn.
The sentence meaning and the ending rule should both be understood.