The Qin dynasty and early Han dynasty both stopped all non-Legalist philosophies, like Confucianism.
I'm 99.9% sure it is D - but let me double check. Will comment back in a few.
The reason that gave birth to similarities between the Almoravid and the Almohad empires which were Muslim dynasties was the pilgrimage that they undertook. This is because as a result of this pilgrimage, they brought back foreign Arabic culture and influences to their respective empires. Because the origin of these cultures was the same, it lent similarity to the two empires.