Praise be to Allah.
If you though it most likely that the one who asked you where the shop was, was asking so that he could buy cigarettes there, then what you should have done is refuse to tell him where it was, because by telling him where the shop was, you were helping him to commit evil and making it easy for him. Allah, may He be exalted, says (interpretation of the meaning):
“but do not cooperate in sin and aggression”
It was narrated from Abu Hurayrah that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever calls others to guidance will have a reward like that of those who follow it, without that detracting from their reward in the slightest. And whoever calls others to misguidance will have a burden of sin like that of those who follow it, without it detracting from their burden in the slightest.” Narrated by Muslim (2674).
An-Nawawi (may Allah have mercy on him) said in Sharh Muslim (16/227):
Whoever calls people to guidance will have a reward like that of those who follow him, and whoever calls people to misguidance will have a burden of sin like that of those who follow him, whether he is the first to promote that guidance or misguidance, or someone else did it before him, and whether that is teaching knowledge, doing an act of worship, following etiquette, or anything else.
What is meant by the Prophet’s words [in another hadith] “and it is acted upon after he is gone” is: if he sets that precedent, whether it is acted upon during his lifetime or after he dies. And Allah knows best. End quote.
See the answer to question no. 128686.
The way to erase the sin of that from your record it is by means of repentance, which means regretting this sin and resolving not to do it again, so that you will not direct anyone else to a place of sin.
By this means, Allah will erase your sin.
Even if this man continues to buy tobacco from that shop, there will be no sin on you for that (after you repent).
Allah, may He be exalted, says (interpretation of the meaning):
“But indeed, I am the Perpetual Forgiver of whoever repents and believes and does righteousness and then continues in guidance”
“But whoever repents after his wrongdoing and reforms, indeed, Allah will turn to him in forgiveness. Indeed, Allah is Forgiving and Merciful”
The Prophet (blessings and peace of Allah be upon him) said: “The one who repents from sin is like one who did not sin at all.” Narrated by Ibn Maajah (4250). Classed as hasan by al-Albaani in Saheeh Ibn Maajah.
Shaykh Muhammad al-Ameen ash-Shinqeeti (may Allah have mercy on him) said in Adwaa’ al-Bayaan (5/526): With regard to the issue of giving up sin, we may wonder, if someone repents from the sin that he was committing, whilst the negative impact of that sin still remains, is his repentance still valid, seeing that he was not able to remove the negative impact of that sin at this time? Or is his repentance not valid, because he could not stop the negative consequences of that sin, because stopping the sin is an essential part of repentance, and that was not achieved?
Then he (may Allah have mercy on him) said:
The majority of the scholars of usool are of the view that his repentance in all cases is valid, because repentance is required of him, and he has done as much as he is able of this obligation; whatever he is unable to do, he is excused for, because Allah, may He be exalted, says (interpretation of the meaning): “Allah does not charge a soul except [with that within] its capacity” [al-Baqarah 2:286]. End quote.
Al-Mulla al-Qaari said in Mirqaat al-Mafaateeh (1/242): Ibn Hajar said: If one who called people to sin repents, but people are still acting upon that, will the sin of his having pointed people to the way of sin be erased, because repentance erases that which comes before it, or not, because the conditions of repentance include putting things right and giving up the sin, and so long as people are still acting upon his suggestion and the action is still being attributed to him, it is as if he has not put things right and given up the sin? Then al-Qaari said:
The correct view is that his repentance is valid.
Moreover, putting things right is only required inasmuch as it is possible, and giving up sin and putting things right is dependent upon every individual’s ability.
Furthermore, the ongoing requital for people following him is based on the ongoing approval of the one who is followed; if he repents and regrets it, then that ceases. By the same token, if one who calls people to guidance falls into misguidance – we seek refuge with Allah from that – then the reward of being followed in that also ceases. Moreover, many of the disbelievers used to call people to misguidance, but when they became Muslim, their Islam was accepted, because Islam erases what came before it. The same applies to repentance, and in fact more so, because the one who repents from sin is like one who did not sin at all. End quote.
And Allah knows best.