1b) You know it better than I do.
If you strictly follow the grammar, this one is correct. After the conjunction "than", almost all repetitive words are omitted. This is called "obligatory reduction" and seen in sentences using "as" for comparative description.
It's also correct to say "You know it better than I."
Strictly speaking, 1a) is not correct grammatically, but it is acceptable as colloquial expression. However, it could be confusing because you may think "it is better than I (me), not you in the sentence. Whether it happens or not depends on the context.
2a) Do you know who is he? (Wrong but common)
2b) Do you know who he is?
After "do you know", you do not use an interrogative sentence structure. In your case, "who" comes first, but a phrase having a declarative sentence structure follows.
If the question is "who is he?", you say "Do you know who he is?
But "Do you know who is he?" is not wrong grammatically when the "he" is a complement of the verb "is". This depends on what you ask.
I think I need to modify my description.
I said "You know it better than me" was grammatically wrong for comparison between you and I. This is reasonable when the "than" is a conjunction. But "than" can be a preposition. In this case, "You know it better than me" should be OK.
"Then" as a preposition may be established from such misuse, I just speculate though.