I have been create 2 layers with a text label of each other. When I add that 2 layers in a layer group, I see that 2 labels of 2 layers overlaps like in image below:
Anyone know how to avoid that problem.
WMS requests are completely independent of each other, so GeoServer can't tell that you intend to display the two layers on top of each other. Therefore there is nothing it can do automatically to prevent your two labels being on top of each other.
You can avoid this by combining the two layers into one request, this would need to be done in your client somehow.
Alternatively, you could modify the two SLD files that generate your labels to add a positive and negative offset from the label position so that the two labels are less likely to overlap.