Yes, but it requires some configuration. You need to create two hunt groups with appropriate names like "company A" and "company B" and add the extensions you want to ring in stage 1.

In the "Ring Behavior" field chose one of the custom rings and in the "To-Header" field put in "Group Name and Called Number".
The phones will display the appropriate company name when an incoming call rings in