My stepson gets ridiculously frustrated doing homework. Help!

Me

He is 9 years old and in 4th grade. Either his dad or I will sit down with him while he’s doing homework. No matter the subject, he always gets so frustrated while doing homework and refuses to answer the questions. For example, a question he had today was to define happy. He wouldn’t answer so his dad said ‘well it’s not when you feel sad, right?’ And he just screams ‘I don’t know! How am I supposed to know?!’ Stuff like that repeatedly when he obviously knows the answer. A lot of times he cries from the frustration. So 5 questions that would normally take maybe 10 minutes at most turns into an hour or more. Up until about 2 years ago, he lived with his mom (and went to his dads every other weekend) and did very poorly in school because she wouldn’t help him or make him do homework. Now it flip flopped, he lives with his dad and I, and goes to his moms every other weekend. We know when he goes to her house he never does homework. I think he is overwhelmed now because she never made him do it. I want to help him calm down but I don’t know how?