Taking is gerund here. E.g. I remember taking the bus this morning. "Somebody taking me..." Is a gerund phrase that is the object of remember.
With took, there is an implied "that" before it. Took is the verb with the subject, somebody.