These sentences move from one compound role to a sentence in which both subject and object are compounds.
Idiomatic meaning
Arabic sentence
Allah opened the door of His mercy
فَتَحَ اللَّهُ بَابَ رَحْمَتِهِ
The school gatekeeper opened the school door
فَتَحَ بَوَّابُ الْمَدْرَسَةِ بَابَ الْمَدْرَسَةِ
The boy of this school hit the boy of this school
ضَرَبَ وَلَدُ الْمَدْرَسَةِ وَلَدَ الْمَدْرَسَةِ
My friend laughed
ضَحِكَ صَدِيقِي