F=3gh+7c solve for g