Old black and white American movie

Please help. I’m looking for a movie.
Old black and white American movie.
Maybe from the 1950s, maybe from the 1960s …
The film consists of 3 acts.
The first act is a wealthy homeowner to humiliate some stranger.
this stranger runs out of the house to commit suicide.

Second act. A detective comes to the owner of the house. Asks about a missing stranger.
The homeowner is humiliated.
Then the detective takes off his disguise. Here is the stranger from the first act.

Act three. A stranger takes intellectual revenge on the owner of the house.

Thank you in advance for your help.

Sounds like this:

Or it could be the remake:

Thank you very much!
Incredible. This is what I was looking for.
People are great! I’ve been looking for this movie for 20 years.
Thank you very much for your help.