I think you are mixing up two types of constructions. Your sentences don't have a clear meaning.
a) had + better + verb e.g. I had better take the bus (otherwise I'll be late home)
b) it + is + better + to + verb (infinitive) e.g. It is better to take the bus than walk (because the bus is generally faster)
I hope this makes it clearer for you.