''는 것이었다'' is past tense of "는 것이다"
거 is a spoken form of 것 which means means "thing,fact"
"는 거였어요" is past tense of "는 거예요"
verb stem+는 거 is present tense of modifier
verb stem+(으)ㄴ 거 is past tense of modifier
이 사과는 그가 먹는 거예요. This apple is that he eats.
이 사과는 그가 먹는 거였어요. This apple was that he used to eat.
이 사과는 그가 먹은 거예요. This apple is that he ate.
이 사과는 그가 먹은 거였어요. This apple was that he have ate.
그 전화 그한테 온 거예요. The fact is that the phone call was for him.
그 전화 그한테 온 거였어요. The fact was that the phone call was for him.
이 전화 그한테 오는 거예요. It is certain that this phone call is for him.
All sentences of yours are correct.