IvanhrYes, the conversation is still correct (at least grammar-wise) but the meaning is different now. if he had done it (see conditional III) implies that Ramos didn't take the bag and Jim knows it so it probably doesn't even make sense for Jim to say it.
By contrast, your original sentence (I would be angry if he did it) suggests that Jim doesn't know whether Ramos took the bag or not.
Thank you so much.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.