Before anything else, remember that the animal companion is an NPC, and, while most GMs allow the player to build the animal companion, the GM needn't allow this, instead doing all the work himself and, if exceptionally Gygaxian, even keeping the animal companion's statistics secret from the player. The only thing the animal companion's master picks is the animal companion's bonus tricks (even ability score increases are picked by the animal companion!). Bear that in mind when considering what abilities the (not your) animal companion may have.
Anyway, this low-level advice assumes that the winged marauder alchemist starts at level 1 and that the player gets to build his character's animal companion.
A player must consider two things when dealing with his character's flying animal companion:
What's the mount's carrying capacity? A creature with a load greater than light "counts [that load] as medium or heavy armor for the purpose of abilities or skills that are restricted by armor," and "[f]lying mounts can't fly in medium or heavy barding." The dire bat starts with Strength 9, its light load 30 lbs. The giant vulture starts with Strength 12, its light load 43 lbs. The typical female goblin weighs at least 27 lbs buck naked.1
Assuming the GM says that barding is armor (and unless he's an actual lawyer he probably will), the giant vulture may be able carry the skinny, naked female goblin and some of her gear and still fly.2 The dire bat probably can't.
How quickly can the creature get a +14 bonus to its Fly skill? Tactically, and for the real-life sanity of all involved, the creature will need to hover. A lot. That means the creature's skill ranks all go into Fly until that skill's at +14.
1st-level Examples
This assumes the creature has no feats that increase its Fly skill.
- Dire Bat: Fly +11 (1 rank +3 Dex +3 class skill +4 bonus via maneuverability good). When the creature makes a Fly skill check to hover, rolling a 1–3 means the GM makes up a house rule and a 4 or higher means the creature hovers.
- Giant Vulture: Fly +6 (1 rank +2 Dex +3 class skill +0 bonus via maneuverability average). When the creature makes a Fly skill check to hover, rolling a 1–3 means the creature plummets, a 4–8 means the GM makes up a house rule, and a 9 or higher means the creature hovers.
This is because it's unclear what happens when a winged creature tries to hover and fails the Fly skill check by 1–4. Getting that Fly to +14 quickly, then, means fewer arguments at the table.
Teach the animal companion fight and flee tricks; its feats will suck
Convince the DM that, before play begins, the character taught the animal companion all the tricks he could. The animal companion will die anyway, so it won't matter beyond, like, fight 4, but that's when the character'll need all the tricks he can muster from his companion. Pushing the animal is hard at low levels. That means, one hopes, 7 tricks.
Take the attack trick twice, defend, down, flee, heel, and stay. When it dies, pick attack as the bonus trick. If the character has 6 weeks, the special purpose combat training (or, when its carrying capacity allows, a war saddle (5,000 gp; 20 lbs.)) and the attack trick again as the bonus trick will meet most needs.
The animal companion's feats will be horrible to start, limited as they are to small list of feats until the character can allocate an ability score increase to grant it Intelligence 3. The feat Skill Focus (Fly) is a serious option, as is the feat Weapon Finesse. The feat Flyby Attack isn't; it's not on the list.
Take feats to make bombs better not the animal companion
Better bombs mean more dead enemies faster and a safer animal companion. Beef up bombs with feats to save the animal companion.
That said, if riding the giant vulture the character should have the feat Mounted Combat. It's a gateway feat, gives a low-level alchemist something to do with his immediate action, and may save the animal companion's life.3 After that, Mounted Archery is a possibility, but the goblin alchemist is making ranged touch attacks with his bombs so if it's not needed, don't take it. I like the idea of the feat Indomitable Mount, but I've not used it.
The alchemist is probably commanding the dire bat to engage in combat or employing it for utility, so the feats Evolved Companion (maybe picking bleed, claws, or reach) and Totem Beast are acceptable, but I prefer the feat Spirit's Gift, which although requiring some research is extremely versatile.
As the alchemist doesn't technically cast spells, the character's forbidden from taking the best teamwork feat, Improved Spell Sharing.4 Other teamwork feats can be taken, but most are a waste.5
Don't plan on the same companion seeing later levels
The alchemist will probably replace an Intelligence 3 animal companion whenever the creature gains a new feat so he can change the creature's entire feat load so the creature can do better, cooler things.
Eventually, bonus tricks will and a high Handle Animal skill bonus for pushing the animal companion will be sufficient to make the Intelligence 3 animal companion a valuable addition to the party. At low levels, though, a flying animal companion that's intended as a mount is interesting but difficult and fragile.
1 Fat goblins don't ride flying mounts. Well, they do, but the mounts can't fly when they do. So they're less mounts that can fly and more creatures that could fly if this fat goblin weren't on my back. Goblins probably think this is hilarious.
2 Even a Small peasant's outfit weighs 0.5 lbs.
3 In the long run, the character won't care. In the short run, when he's 1,000 ft. up and the flying companion he's riding dies, he suddenly will. I think many goblins who ride flying creatures' last words are, "I knew I should've taken Mounted Combat."
4 Not the similarly named Improved Share Spells. Sigh. Pathfinder.
5 Okay, Shake It Off has saved my inquisitor's life a few times. Also, a mount with the horsemaster's saddle (12,000 gp; 5 lbs.) or, better yet, the sky marines elite saddle (14,000 gp; 5 lbs.) shares its rider's teamwork feats.
A beast master has one animal companion until 4th, then two animal companions until 7th, and then three animal companions until 10th. A 10th-level beastmaster has four animal companions.
This is not affected by how you enter the prestige class.
So, for your example of a 5th-level ranger (who has the animal companion of a 2nd-level druid), when he becomes a 1st-level beastmaster, he gains four effective levels in druid, so his (already-existing) animal companion becomes as strong as the animal companion of a 6th-level druid.
At the ranger/beastmaster’s 4th beastmaster level, this animal companion is now as strong as that of a 9th-level druid. He additionally gains a second animal companion, at his beastmaster level — 3 (read: 1st). In total he has one animal companion that is as strong as a 9th-level druid’s, and a second animal companion that is as strong as a 1st-level druid’s.
In the end, as a 5th-level ranger/10th-level beastmaster, he has four animal companions:
as strong as the animal companion of a 15th-level druid.
as strong as the animal companion of a 7th-level druid.
as strong as the animal companion of a 4th-level druid.
as strong as the animal companion of a 1st-level druid.
If the beastmaster were not a ranger, but rather a barbarian, he would be exactly the same except that his first animal companions would be as strong as the animal companion of a 13th-level druid, not 15th.
(As you might imagine, the actual usefulness of those low-level animal companions is seriously limited.)
Best Answer
Switch to the Unearthed Arcana Revised Ranger
The ranger, particularly the Beast Master ranger, is a notoriously weak class. Effort have been made to improve it in errata, but they haven't gone far enough. You have already encountered just one of the issues with it. The Unearthed Arcana playtest material has a revised ranger class that significantly improves the utility of the ranger companion if you choose the Beast Conclave.
Note: this is only playtest material and not officially allowed; you will need your DM's approval to play it, and it cannot be used in organised play.
The revised Beast Conclave animal companion has several advantages over the Player's Handbook version that increase both its survivability and its usefulness in combat:
Most significantly on top of being a much stronger and more useful companion, should your companion die you can revive it in a new body with 8 hours work and 25gp worth of rare herbs.
There are a lot of changes in this version of the ranger and it isn't perfect. You give up your extra attack to increase the damage of your companion but if that's the playstyle you want isn't so bad.