You can enable the "Company" field in the Shopify checkout so that if a customer enters a company name, Shopify will mark it as a Business address and if the customer does not enter the company details, it will be marked as Residential. FedEx Home and Ground services will be shown accordingly.
Another way is to use the FedEx Rates, Labels & Tracking app which automates this process. You can provide FedEx Ground or FedEx Home Delivery at checkout based on the shipping address using the app. The app uses the FedEx address validation API to classify the address as commercial or a residential address and automatically provide the FedEx Ground or FedEx Home Delivery at checkout.
There is a better solution for this. With Shopify's FedEx integration, if your customer gives a company name at checkout, this means the address is a commercial address. If he gives does not give one, that means it is a residential address. You can utilise this. However, since this is full proof, another way of classifying address in real time is by using your own FedEx account and then using the Multi Carrier Shipping label app to ship with this account. Make sure to get address validation enabled in FedEx. Once you do that, FedEx will classify the address by itself and the app will segregate the address and implement the shipping charge for it and show Home Delivery or Ground based on that.