If a person is away from home at the time when Chanukah candles are to be lit, his obligation is fulfilled through his wife's lighting back at home. If a person will spend the night as a guest in somebody else's home where he receives full hospitality, such as with his parents or in-laws, then he fulfills his obligation through the host's lighting. Since he depends on the host for all his needs, he is considered part of the household and thus included in the host's lighting; he therefore does not have to give the host money to purchase a share in the Chanukah candles.
What does one do if he visits somebody's home in the evening, but will return home to sleep? Say, for example, a couple spends Shabbat with one set of parents, remains with them after Shabbat for Melaveh Malka (the traditional meal eaten on Motza'ei Shabbat), and will then return home to sleep? Do they fulfill their obligation of Chanukah candles through the lighting of the parents, or should they light when they return home?
Chacham Ben Tziyon Abba Shaul (1924-1998), as cited in the work "Or Le'tzara," ruled that in such a case, the visitors should have in mind not to fulfill their obligation with the host's lighting, and should light when they return home. Even though they will be with their hosts during the proper time for lighting and will return home late at night, they should nevertheless light the candles themselves upon arriving home.
Summary: A man who travels alone fulfills his obligation of Chanukah candles with his wife's lighting at home. If he spends the night as a guest and receives complete hospitality, he fulfills the obligation through his host's lighting. If one goes away for the evening and returns home to sleep, he should have in mind not to fulfill his obligation through the host's lighting, and should light at home.