دَخَلْتُ الْمَدْرَسَةَ وَأَخَاكَ
I entered the school with your brother.
- الْمَدْرَسَةَ is the bounded place entered, a construction learned in the previous level.
- وَ then means with.
- أَخَاكَ is the person who accompanied the speaker, so it is maf'ul ma'ahu.
Both highlighted nouns are mansub, but they do not have the same grammatical role. An ending alone does not identify the complete role; the verb and meaning matter.