The Crossbow Expert feat (PHB, p. 165) says:
When you use the Attack action and attack with a one-handed weapon you can use a bonus action to attack with a loaded hand crossbow you are holding.
Consider a level 5 Ranger with the Crossbow Expert feat. This means she has the Extra Attack feature and can also fire multiple shots from crossbows, avoiding their "loading" aspect. If she takes the Attack option, she is then able to attack twice (via Extra Attack), and also use a bonus action to attack with a hand crossbow she is holding, if she attacks with a single-handed weapon.
The answer to this question indicates that the hand crossbow itself can count as that single handed weapon. So one option she has is to shoot the hand-crossbow three times, via her action (Attack), bonus action and Extra Attack, provided she has one hand free with which to reload. So far so good.
Furthermore, the answer to this question shows that the Extra Attack can be made by a different weapon to her attack, and the answer to this one says that she can drop one weapon (for free) and pick one up via her object interaction. So another option she has is:
- Start with a hand crossbow in one hand, and nothing in the other (so she has a free hand to reload)
- Attack with a hand crossbow, enabling both the Extra Attack and Crossbow Expert bonus action features
- Use her bonus action to shoot the hand crossbow
- Drop the hand crossbow (free) and pick up / pull out a heavy crossbow
- Fire the heavy crossbow via Extra Attack.
I think this is within RAW and RAI, but it does mean she drops, rather than stows her hand crossbow. Let's say she's happy to do this. On her next turn she:
- Starts with a heavy crossbow in her hand(s)
- Attacks with it, enabling the Extra Attack feature
- Drops the heavy crossbow (free) and picks up the hand crossbow (object interaction)
- Fires the hand crossbow via Extra Attack.
Having used the Attack action (albeit with a two-handed weapon), and also having attacked with a one-handed weapon (via her Extra Attack) while holding a hand-crossbow, can she now fire the hand crossbow a second time via the Crossbow Expert bonus action?
The idea is she would repeat these two turn patterns, getting in extra damage via the use of a heavy crossbow one one of her three shots, at the cost of having to leave one of her weapons on the ground between turns.