The statement that correctly compares atrocities committed by Nazi Germany and Imperial Japan during WWII is:
Both the Nazis and Japanese used racial superiority as a justification for the imprisonment and extermination of groups of people.
While both regimes engaged in horrific acts and atrocities during the war, the motivations and specific targets of their violence differed significantly. The Nazis primarily targeted Jews, Romani people, and various other ethnic and social groups based on their racial ideology, while Imperial Japan's atrocities were often guided by notions of racial superiority over other Asian peoples and included brutal occupations and treatment of local populations. The other statements contain inaccuracies regarding the specific actions and ideologies of each regime.