Questions & Answers about اول ما وصلت المكتبة، اشتريت قلم جديد.
اول ما means as soon as or the moment that. It introduces the first action in a sequence.
So:
اول ما وصلت المكتبة
= As soon as I arrived at the library
In Egyptian Arabic, this is a very common way to connect two actions.
In informal Arabic writing, people often leave out some hamzas, especially in everyday typing. So اول is very commonly written instead of the more standard spelling أول.
They mean the same thing. For a learner, it is good to recognize both.
Arabic usually does not need an explicit subject pronoun if the verb already shows who is doing the action.
Here, وصلت and اشتريت already tell you the subject is I from context, so أنا is omitted.
You could say:
أنا اول ما وصلت المكتبة، اشتريت قلم جديد
but it is usually unnecessary unless you want emphasis.