All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If the situation is as you mentioned that your brother-in-law took off his shirt in a way that his ‘Awrah (parts of the body that must be covered in Islam) was uncovered, then he is wrong. Indeed, you did well by looking away and going away from him. We would like to mention here that the ‘Awrah of a man is from the navel to the knee as we clarified in Fatwa 87818.
Moreover, if what you mentioned is true that he told you “if your husband divorces you, you are welcome…etc.”, then if he intended to incite you to seek divorce, then he is trying to spoil the marital relationship between you and your husband and this is forbidden as we clarified in Fatwa 92056.
However, you should not have informed your husband of what his bother said or did to you as the harm of informing him is greater than its benefit.
It should be noted that the wife’s brother-in-law is a non-Mahram to her, so it is not permissible for her to mix with him in a forbidden manner or allow him to be in seclusion with her or take her Hijjab off in front of him.
Indeed, the Sharee’ah warned women against the male relatives of the husband more than any other males. ‘Uqbah Ibn ‘Aamer narrated that the Prophet said: “Beware of entering upon women;” they said: ‘O Messenger of Allaah, what do you say about the male in-law (the woman’s husband’s male relative like his brother, uncle, cousin, etc)?’ He replied: “He is death itself (i.e. his seclusion with her is as serious and dangerous as death).” [Bukhari and Muslim]
So, a husband should help his wife in being chaste and in avoiding reasons of temptation.
Finally, it should be noted that a wife is not obliged to visit the family of her husband (i.e. her in-laws), especially if she fears they may harm her.
Allaah Knows best.