The duke and king expose their racism when they suppose that a black person might try to steal the money, when they themselves are stealing the money! It must be said, though, that, while the duke and king are racists, they do not seem to be making a moral judgment against black people here, but rather are just concerned with the practical matter of keeping the money to themselves.