Hi, Yes,
Carlos remembers Eleanor even though they studied together fifteen years ago.
That sentence is grammatically correct and all English speakers will understand exactly what you mean.
However, you initial statement:
I'm studing to my english test and I'm not sure about this sentence.... could someone help me?
Should be (corrections in capitals):
I'm studYing FOR my english test and I'm not sure about this sentence.... could someone help me?
Hope that helps.