You can retrieve and drink the potion in one round, unless your DM rules otherwise
Page 196 PHB says about object interactions:
You can also interact with one object or feature of the environment for free, during either your move or your action. (...) If you want to interact with a second object, you need to use your action. Some magic items and other special objects always require an action to use, as stated
in their descriptions.
The page also lista a table for Interacting with objects around you. It says
Here are a few examples of the sorts of thing you can do in tandem with your movement and action
So each single one of them would cost you your "free" object interaction, and if you wanted to do two of them, then you would need to use your action. There is a examples relevant to your case:
- withdraw a potion from your backpack
It is safe to assume that withdrawing an item from a backpack is as difficult for your own backpack as for another one. A backpack is a backpack. It may be slightly harder as you do not know how they packed it, but it may be slightly easier, as you do not have to grope around on your back but have it right in front of you. So getting the potion out of the backpack costs you an object interaction.
The DMG says about potions of all kinds (including healing potions) on page 139:
Potions are consumable magic items. Drinking a potion or administering it to another character requires an action.
So, taken together, you can use your free object interaction to withdraw a potion from the characters' backpack, and then you can use your action to administer it. Both can be done in a single round.
Is this realistic?
Realistically, to get a potion from a backpack in 3-4 seconds so you still have time to administer it, it must be put there in an accessible way to begin with, like being stuck in an outer pocket, although the rules do not differentiate that.
For what it's worth, if the potion is really inside the backpack, in our group we feel this is a bit too much to do within 6 seconds, based on our own real-life experience of how long it takes to dig something out of a closed backpack, undoing the latches etc. You also need to unstopper the potion, and they are likley either corked, sealed with wax or screwed tight, so the valuable liquid is not getting lost. And then you need to administer it. It strains credibility to be able to run 30 feet and do all of that in one round.
So we rule that you taking something from your or anothers' backpack generally takes your full action, and you need to carry the potion more easily accessible at your belt or similar location to grab it with a free object interaction, following the guidance on p. 196 PHB
The DM might require you to use an action for any
of these activities when it needs special care or when it presents an unusual obstacle.
But that is a DM ruling and house rule.