그래야 = 그래야만 = Should be so, must be so, have to be so...
"그래야만 했어?" = "Did you really have to do that?" = "Was that only way possible?"
1) 그래야... = "That would be the only way..."
2) 우리 선생님... = "Our teacher"
3) 도... = "As well"
돈 벌어 먹고 사시는(honorific) -> 돈 벌어 먹고 사는(casual)
돈 = "Money"
벌다 = "to earn"
먹다 = "to eat"
살다 = "to live"
4) 돈 벌어 먹고 사시는... = "to make a living"
5) 거 아니겠어? = Wouldn't it?
그래야 우리 선생님도 돈 벌어 먹고 사시는 거 아니겠어?
= "Isn't that the only way our teacher would make a living as well?"