This actually can be answered by logic. On Yom Tov one is allowed to light a candle from an existing flame. As a result, one would light the candle at home upon returning there. Since one would do this at once, the light of the candles would now be used and be yotzei lighting the candles.
For example Thus, if one eats out, one can light the Yom Tov candles upon returning home (from the stove flame or lit yahrtzeit candle).
while it is forbidden to create a flame on a holiday, it is permitted
to light a candle using a pre-existing flame, such as another candle
that was kindled before the holiday, a gas range which has been left
on, or a pilot flame
On the first night of a holiday: Ideally the candles should be lit –
just as on every Friday afternoon – eighteen minutes before sunset.3
However, the candles can be lit anytime before the holiday meal.4 If
the candles are lit after sunset, they should be lit from a
pre-existing flame. Exceptions: a) If the first night of the holiday
is Friday night, the candles must be kindled before sunset. b) If the
first night of the holiday is Saturday night, the candles must be
kindled after nightfall (from a pre-existing flame).
On the second night of a holiday: The candles should be lit, from a
pre-existing flame, after nightfall.5 (Additionally, all preparations
for the candle lighting, such as arranging the candlesticks and
candles, may not start before nightfall.6) If the second night of the
holiday is Friday night, the candles must be kindled before sunset,
also from a pre-existing flame.