“Good in bad” (טוב ברע) = “bad in good” (רע בטוב) equals 289 = “good” (טוב ,17) squared.
The phrases “good in bad” (טוב ברע) and “bad in good” (רע בטוב) appear only once in the Bible, juxtaposed in the same verse – “good in bad or bad in good” (Leviticus 27:10). In the context of the verse – the prohibition of substituting a “good” sacrifice for a “bad” one or vice versa – “good in bad or bad in good” translates as “good for bad or bad for good.” From this we may infer that if one sees good in bad or bad in good in a certain sense he is substituting good for bad or bad for good.
But from the above gematria we learn that ultimately by seeing good in bad and bad in good, and being able thereby to substitute one for the another, it becomes apparent that all is (for the) good. This seeming paradox reflects itself in the continuation of the verse that says that if one does substitute good for bad or bad for good (thereby committing a transgression) both become sacred – all becomes (turns into) good!
Relatively, the bad is on the surface of the good, it is the “shell” of the good (whose ultimate purpose in creation is to protect the good, the “fruit,” and allow it to grow to fruition). The good, on the other hand, is hidden within the bad. That’s why it’s harder to see the good in the bad than to see the bad in the good. The sages teach that even the wicked of Israel are full of mitzvot (good deeds) as a pomegranate is full of seeds (its fruit).
In Kabbalah, the “clarification process” (עבודת הבירורים) is separating the good from the bad, which of course can only be accomplished if one is able to see, to identify, the good in the bad and the bad in the good. The rectified right eye is able to identify the good in the bad and extract it in order to keep it. The rectified left eye is able to identify the bad in the good and extract it in order to discard it. The actual extraction, of both good from bad and bad from good, is performed primarily by the right hand (the “controlling” limb of the month of Tamuz, as explained in the Book of Formation), the hand of loving-kindness.