Technically Erg isn't it spozed to be 'he'
It makes sense, but it would read better like this:
"I couldn't recognize him at first but then, as he started walking toward me, I realized it was him."
Not in modern English
"He" is the more technically correct