There are multiple ways you can do this. These vary somewhat if you're running 5.2.x or 5.4.x.
Solutions will vary depending on how the businesses are connected and what services they require. Are they each connected with their own switches and routers, or are they all plugging into the same switch? Do their users need to be able to VPN in? Are they running their own servers that need to be publicly exposed? Are they handling their own wifi needs? Etc. etc.
If the companies both need to be able to manage "their" part of the FortiGate, then you may need to use VDOMs. An example of this is at http://cookbook.fortinet.com/vdom-configuration-54/.
If you're doing all the management, as long as the two companies are on different physical switches, you can keep them on separate physical interfaces, each with their own subnet. If they're all on the same switch at some point, then vlans on a managed switch are a safer way to keep things separated. There are a number of examples of this in the forums and the KB and cookbook. The FortiOS 5.4.x admin guide has a section named "Example VLAN configuration in NAT mode" if you haven't worked with them before.
Routing the different companies networks, based on their vlans or subnets, out the different WANs can be done with policy routes (source based routing). The way to do this is a bit different if you are on 5.4.x or 5.2.x.