Know that as a result of Adam’s sin, good and evil became intermixed. Therefore, sometimes a little of the good of the Nefesh of a righteous person can be in an evil person, and a little evil can be found in the righteous person. This is the meaning of, "There are some righteous people who are reached by [can perform] acts of the wicked" (Eccl. 8:14). Thus you find some righteous people who sin in ways that even evil people do not, and just the opposite: evil people can be particular about specific mitzvahs all of their lives.
From this you can also understand the concept of a 'tzaddik gamur' [a completely righteous person], 'rasha gamur' [a completely evil person], and 'beinoni' [an average person.] Each one is the product of a different combination of good sparks and bad sparks.
This is no contradiction to free will. It only comes to explain people's tendencies. The final choice of one's spiritual status always remains with the person.
Furthermore, the way in which one transgresses or performs mitzvahs will also depend upon the level of the sparks he has received, from which limb [of the inclusive soul of Adam] they have came, and whether or not they are good or evil. This will affect a person’s desire to perform mitzvahs and can explain why they pursue mitzvahs more than other people.
Thus, the Sefer HaBahir insists that a person pursue the guilty in order to find merit for them1, like one who runs after [saving] his own life. This is because the evil person, whom the righteous person pursues to find merit, may possess good sparks that the righteous person lacks, while he himself may have received the evil person’s bad sparks. However, through a loving relationship, he [the righteous person] can extract the good sparks from him and achieve completion, while giving away the bad sparks and completing the other's evil. This is the secret meaning of, "The righteous person takes his portion and that of his friend in the Garden of Eden; the wicked one takes his portion and that of his friend in Purgatory". (Chagigah 15a)
This is also the meaning of, "If your enemy is hungry, feed him bread" (Proverbs 25:21), for it says, "When you see the donkey of your enemy" (Ex. 23:5). [Who could be your enemy when one is supposed to love everyone? Hence] it must be referring to an evil person who hates God, as it says, "Those who hate You G‑d, I hate" (Psalms 139:21). Yet it says, "If your enemy is hungry, feed him bread." Thus it means, for the sake of the good spark that is in him which drives him to do good, feed him the bread of Torah and mitzvahs and cause him merit. For the "coals," that is the bad sparks within you, which you "pour on his head" (Proverbs 25:21) by joining with him - they will [thereby be] removed from you.
The tsadik has to retrieve the sparks that really belong to his soul. Yet how can he extract the little good found in a wicked person and leave him empty? The Ari says, "for the sake of the good spark that is in him which drives him to do good, feed him the bread of Torah and mitzvahs and cause him merit". The tsadik magnetizes the spark by feeding it good. Even though he takes it away, he gives other sparks to the wicked person in its place. This can result in inspiring him to turn over a new leaf. (See Likutei Maharan 282)
This is also like what is written, "The goat shall bear all the sins upon it into a desolate land" (Lev. 16:22). That is, the good sparks in it shall be removed and G‑d shall repay them to you and make you completely good and him completely evil.2 For, as the sages say, "Don’t read ‘repay you,’ but rather ‘He will complete you’". For God, since He is good, will not mention His Name in conjunction with the wicked, as it says, "through the coals of fire that you pour on his head" (Proverbs 25:21). However, with respect to good, He will mention His Name, as it says, "G‑d will repay you" (Ibid.) - because he does this good.
Yom Kippur, the Day of Atonement, is set aside for forgiveness. Part of the way it works is through this that God looks at the good and judges in the scale of merit. He reckons that all of the sins really don't come from us, rather from the evil inclination, represented by the goat. He bears all the sins (Lev. 16:22) and is send away, to be pushed down the mountain. All the sins are thereby dissolved.
[Translation and commentary by Perets Auerbach.]

With all due respect to the Holy Tzaddik (and recognizing that the misunderstanding is caused by my own lack and lowliness), this is a very difficult concept
If a wicked person (or even a person that is not a Tzaddik) is aware of this lesson, would they not be encouraged to avoid the Tzaddik, in order to avoid losing their own good (and receiving the Tzaddik's bad point?)
And if the wicked person decides that their avodah will be to lovingly give the Tzaddik their few good points, and accept the Tzaddik's bad sparks as their own, then does this not actually make the "wicked" person a selfless Tzaddik in their own right?
So the "wicked" person who accepts the exchange of sparks with the Tzaddik, ends up both (a) having only wicked sparks, but also (b) being a completely selfless Tzaddik, per their accepting the exchange.
It seems to effectively "punish" good behavior, while rewarding bad behavior (stay away from the Tzaddik and keep your good points).
Pls hlp clear my confusion
It seems that the discussion here is about the inclination of the righteous or wicked person, not about their actions. The Tzaddik may have a negative impulse that is really from another person's soul, while they may have a positive impulse that derives from the Tzaddik's soul.
The interaction between the Tzaddik and the wicked person is mutually beneficial. The Tzaddik retrieves the good spark that belongs to them, thus removing themselves from evil entirely, while the wicked person is influenced to come closer to Torah observance, thereby gaining merit which helps them overcome their evil inclination.
Possibly the very reason why the wicked person was created with that evil inclination is because it is their purpose to overcome it and rectify it. By having a relationship with the Tzaddik they are enabled to do that.