> Japanese Empire was a racist
It was.
> what country takes slaves from Africa
The US did, amongst others.
However, I don't see how the latter alters the former. This is like Jason and Freddy comparing which is the greater killer. Even if Freddy killed more people than Jason (?), that doesn't mean Jason is suddenly not a killer. They're both despicable.
Of course, whether the US had a more abhorrent form of racism is debatable. Black slaves were treated poorly by their White masters (ended 1860s), yet what the Japanese sometimes did to conquered peoples was terrifying (1940s).
Even today, an admittedly unsubstantiated observation is that the US recognizes that there's a problem with racism within its borders. Japan doesn't seem to. Here's a quick test: imagine if your daughter wanted to marry a Black man. Who do you think would have more of a problem with that, an American or Japanese parent?