Assume I can get TN for company B's client. Is the following case legal?
-You can not have two types of status in US. If you work for A when you are physcially in Canada (working location is in Canada), you do not need the H1 status to work. Thus,you can work for B using TN in US. Otherwise, you have to get the part-time H1 status from B. You can have two H1, repectively, from two employers that same period of time, but not H1 from one employer and TN from another at the same time.
When I go to meet with company A in US, I use my I-94 with H1B stamp on it. A few days later, if I need to work for B's client in US, I use another I-94 with TN stamp on it. Or, I can only have one I-94 at a time.
That would mean each time when I cross the border by land, I have to get a new I-94 according to which company I am going?
-Correct. But if you just need to see A, you do not need to have H1 status unless you work for them in US and you can use B2 (your passport) or just visit A when you work for B..