Which of the following sentences is correct?
Before he had come to the factory, Tom was studying at the university of London.
Before he came to the factory, Tom had studied at the University of London.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
Keep It Simple - Stick to simple past.
A: Before he came to the factory, Tom studied at the University of London.
Using past perfect (had come) places the narrative focus further back in time. Once you've started with that, you can't refer to anything earlier without also using past perfect, so OP's #1 is incorrect.
In this case, since studying predates coming to the factory, you could reasonably refer to the earlier action with past tense:
B: Before he came to the factory, Tom had studied at the university of London.
It would be (just about) possible to use had come in B. But it serves no purpose unless the narrative context primarily concerns other events in the past which are all later than both studying and coming to the factory. That's a complex literary context which probably isn't relevant here, so just forget about it.
If OP wants to use past continuous for the studying (I see no good reason for that here, and it seems "stilted" at best), I might prefer to see that same verb form reflected in the initial clause:
C: Before coming to the factory, Tom was studying at the university of London.
Note that A, B would be just as good with the "progressive/continuous" participle (coming), and C would be just as bad with simple past (he came). Although I must admit, "bad" is perhaps putting it too strongly; there are contexts where competent writers would use #3, but I don't think learners need concern themselves with this form until they've mastered the "standard" usages.