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.
This statement accurately reflects how both regimes viewed themselves as superior and used that belief to justify their brutal policies and actions against various groups.
The other options contain inaccuracies. For example, while Nazis specifically targeted Jews, Romani, and Poles, the Japanese did not have the same kind of systematic extermination policy aimed at these specific groups. Similarly, the use of religion as justification for atrocities is more prominently associated with the Nazis, while the Japanese atrocities were primarily framed around notions of national superiority and imperialism rather than religious justification. Finally, while Japan did employ biological warfare, it does not have the same historical prominence regarding civilian populations as in the context of Nazi atrocities.