**Update:** An alternative approach: Post-process `ContourPlot` output to inject contour labels:

    ClearAll[addLabels]
    addLabels[colors_, labels_: Automatic, threshold_: 1/3] := 
     Module[{diag = ArcLength @ Line[Transpose @ PlotRange @ #],
         assoc = AssociationThread[colors, labels /. Automatic ->  
           MapIndexed[Framed[Style["(" <> ToString @ #2[[1]] <> ")", #, 12], 
            FrameStyle -> None, Background -> White, 
            FrameMargins -> Small] &, colors]]}, 
        ReplaceAll[{d_Directive, l__Line} :> 
         {d, l, Module[{BSF = BSplineFunction[First@#], 
           pos = If[ArcLength[#] < diag threshold, {.5}, 
            If[Norm[Subtract @@ #[[1, {1, -1}]]] <= diag threshold, {.3, .8}, {0, 1}]]}, 
          Text[assoc@FirstCase[d, _?ColorQ], #] & /@ (BSF /@ pos)] & /@ {l}}]@#]& @* Normal


***Examples:***

    {g1, g2, b} = {x + 2 y, 2 x + y, {2, 2}};

    funcs = {g1 - b[[1]], g2 - b[[2]]};

    colors = {Blue, Magenta};
    
    plot = ContourPlot[funcs, {x, -2, 4}, {y, -2, 4}, Frame -> False, 
       Axes -> True, 
       ContourStyle -> Thread[Directive[colors, Thick]], 
       ImageSize -> 400,
       PlotRangePadding -> Scaled[.05]];

    addLabels[colors]@plot

[![enter image description here][1]][1]

With 

    funcs = {g1 - b[[1]], g2 - b[[2]], Cos[x - 1] + Cos[y - 1] - 1/3, 
       Sin[ x - 1] + x y Cos[y + 1] - 1/4};
    colors = {Blue, Magenta, Red, Green};

`addLabels[colors]@plot` gives

[![enter image description here][2]][2]

We can use the second argument of `addLabels` to inject pre-specified labels instead of automatically generated ones:

    labels = MapIndexed[Framed[Style["(" <> ToString@#2[[1]] <> ")", #, Bold, 18], 
         FrameStyle -> None, Background -> White] &, coloresRest];

    addLabels[colors, labels] @ plot

[![enter image description here][3]][3]



**Original answer:**

    {g1, g2, b} = {x + 2 y, 2 x + y, {2, 2}};

    coloresRest = {Blue, Magenta};

    labels = MapIndexed[Framed[Style["(" <> ToString@#2[[1]] <> ")", #, 18], 
         FrameStyle -> None, Background -> White] &, coloresRest];

    Show[MapThread[
          ContourPlot[#, {x, -2, 4}, {y, -2, 4}, 
             Frame -> False, 
             Axes -> True,
             ContourShading -> None, 
             Contours -> {0}, 
             ContourStyle -> Directive[#2, Thick], 
             ContourLabels -> Function[{x, y, z}, Text[#3, {x, y}]], 
             ImageSize -> 400] &, 
          {{g1 - b[[1]], g2 - b[[2]]}, coloresRest, labels}]] 

[![enter image description here][4]][4]


  [1]: https://i.sstatic.net/J0fuX.png
  [2]: https://i.sstatic.net/Oo0IB.png
  [3]: https://i.sstatic.net/HlpEG.png
  [4]: https://i.sstatic.net/NjEmF.png