Letter of recommendation

I have done high school from two schools. So, can my teacher from my previous school write my lor?

Yes, but was this teacher a freshmen or sophomore year teacher? Most colleges suggest the LoR writers be a junior or senior year teacher, someone with recent contact and insights. However, if the prior teacher was particularly close to you, and especially if they are a key part of your narrative to a particular interest you want to highlight, it would probably be a more effective LoR than a more generic LoR’ from a current teacher.