That’s perfect, @gautam.newalkar. Indeed, “ter + de” is supposed to be more correct, but at this point, most people will use them both without even thinking about it. There’s no extra depth to either of them when used interchangeably.
If we were to use them exactly as prescribed, we would have to use only “ter de” to describe the neecessity or obligation of doing something/something happening. In this case, “ter” works as an auxiliary verb in the sentence.
- Eu tenho de estudar (I have to study). And you could also say: Eu preciso de estudar.
- Eu tenho de fazer estas coisas (I have to do these things). And you could also say: Eu preciso de fazer estas coisas
On the other hand, “ter que” would only be used in contexts where “ter” is the main verb in the sentence and “que” is not actually coupled to it, but to whatever verb comes next. That’s because when you use “de”, the sentence structure goes like this in English: “I have to do [noun]”. When you use “que”, the sentence structure is actually “I have [noun] to do”, but the noun here may be omitted. The latter also makes it possible to abruptly end the sentence with a verb that would usually require an object right after it.
This is the best I can explain it and it still won’t make you instantly master this. I keep saying this, but really, Portuguese is messed up. Just… Good luck to all of you. I will be praying