This question already has an answer here:
If one does not daven arvit/maariv before havdallah it seems to me that he is not permitted to touch a candle, etc. (for not having said hamavdil). How does preparing for the havadallah ceremony where one is still obligated to shabbat work as far as permission of actions like striking a match or touching a candle? When precisely does the ability to perform melacha resume?