Our President-elect has a son Hunter, who did the very same thing. He married his dead brother's wife. Yes, it's legal as there was no blood relationship between the two of them.
Leave aside the relationship .If she is a married woman how can you marry her too .That means the woman will be having two husbands .It is illegal unless polygamy is permitted in your country .
Yes it's legal. It's happened often where someone marries a brother or sisters widow or widower or after a divorce. They are NOT related. Totally different DNA.