Sam - In writing my topic The Baby In The Woods, I considered whether to expand the hypothetical to what Person B should ethically do instead of using violence against Person A. Ultimately, I decided to keep the issue more narrow for clarity. However, I'm happy you introduce the topic here and expand the hypothetical in this way because it illustrates more clearly why Person B resorting to violence would be wrong if this happened in the "real world." Initiation of volence is often easier than non-violence, but it is nonetheless wrong.
My take is similar to yours - Person B should attempt to persuade Person A to share the food, but if it becomes clear that Person A won't budge, Person B should attempt to help the child without violence. If I were Person B and lacked any food of my own, I would take the child to the nearest home or town I could find. The original hypothetical doesn't consider the baby's parents at all (maybe they're dead), but if it turns out that they neglected to care for the child, then absolutely they should be held accountable.