In compositor I want to apply color balance node only on a part of image for which I have a mask. I have issue with combining original image with modified part so that a colors aren't mixed together but they're replaced (in place of the mask) How can I achieve this effect?
Based on the information in your question I am assuming you already created the mask.
Instead of combing the two results after you have colored corrected the one you could restrict the color correction to a specific region.
To do this feed the mask into the Fac Input of the Color Balance Node.
You can also use an image as a mask. Plug the image into the Fac Input of the Color Balance Node. Note that white means apply, black mean ignore. THis mean that the color balance will only be applied where the image is white. In my case I had to invert the colors to only apply the color balance on the scribble.
Vader's answer is better in this case, however it is possible to do this using the mix node by using the mask/black and white image as the mix factor: (click for full size)
This works because the mix factor is controlled per-pixel by the black and white mask.
White = mix factor of 1 and
black = mix factor of 0. So the bottom input will be used where the mask is white and the top input will be used where the mask is black.
Split view of the mask: