“was unfaithful to him.” It is possible, but less likely, that this could be translated “got angry with him” (deriving the Hebrew root for “to be angry, to hate,” see NET text note. The text does not give enough information to know exactly what happened between them.
“a period of four months.” The Hebrew text is idiomatic: “days: four months.”