I propose another solution based on extracting the point of the mesh generated by the two contours. First, I generate the plots with the mesh curve $f=g=0$:
pl1 = Plot3D[#, {x, -2, 2}, {y, -2, 2}, Mesh -> {{0.}},
MeshFunctions -> {#3 &}, PlotPoints -> 200,
MeshStyle -> {White, Thickness[0.007]}, ImageSize -> 500,
BoundaryStyle -> None,
PlotStyle -> {Red, Directive[Opacity[0.4]]},
SphericalRegion -> True, AxesLabel -> Automatic] & /@ {f, g};
Now I extract the point of the both meshes and create a curve by interpolation:
ptsf = Join @@ Cases[Normal@#, Line[x1__] :> x1, Infinity] & /@ pl1;
flip1 = Interpolation[{#[[2]], #[[1]]} & /@ ptsf[[1]],
Method -> "Spline", InterpolationOrder -> 3];
flip2 = Interpolation[{#[[2]], #[[1]]} & /@ ptsf[[2]],
Method -> "Spline", InterpolationOrder -> 3];
The the region between the two curves (taking into account the intersection points):
Plot[{flip1[x], flip2[x]}, {x, solution[[1, 2]], solution[[3, 2]]},
Filling -> {1 -> {2}}, Frame -> True, FrameTicks -> True,
RotateLabel -> False,
FrameLabel -> (Style[#, 24, Italic,FontFamily -> "Times New Roman"] & /@ {"y", "x"}),
PlotRange -> {{-2, 2}, All}]
It is easy obtain the area of the region for comparison to previous answers:
NIntegrate[Abs[flip1[x] - flip2[x]], {x, solution[[1, 2]], solution[[2, 2]],
solution[[3, 2]]}, Method -> "GaussKronrodRule"]
yielding 3.01553
. We can see that there is some difference in this value. I have checked that depends on the plot sampling, so coarse sampling gives lower value than those previous reported.