Shouldn't it be "It was two years"? How come did she say "I was two years"?
Native speaker’s answer
Rebecca
"I was" in this case is another way to say "it was when I was". You can use the phrase "it was" in this case, however, "I was" is used because it indicates that the speaker is directly involved in or related to the action. Here's a few examples of "I was" in similar contexts: Ex: I was in high school when that song became popular. Ex: I was just starting work when I got the call.