I realize that the title is pretty vague without some context.
I am trying to show that $$-\frac{i\hbar}{\sqrt2}\left(\pm i\color{blue}{\left(g_y+\frac{yz^2f^{\prime}}{r}\right)}-\pm i\left(\frac{yz^2f^{\prime}}{r}\right)-g_z\right)=\frac{1}{\sqrt2}\left(i\hbar g_z \pm \hbar g_y\right)\tag{*}$$
In order to try to get close to the answer on the RHS, the bracket in blue must distribute over addition. However, if we had simply $$\pm (7+5)\stackrel{?}{=}\pm 7 \pm 5\tag{?}$$
When considering just the positive and negative signs independently $(?)$ seems to hold as $$+7+5=12$$ & $$-7-5=-12$$ and the LHS ($\pm 12$) of $(?)$ is satisfied.
Could someone please explain whether or not $(?)$ holds?
Yes, you are correct. $$\pm (7+5) = \pm 7 \pm 5 = \pm 12$$ since both the numbers $5$ and $7$ hold the same positive sign.
Just for the information: Care is needed only in cases like: $$\pm (7 - 5) = \pm 7 \mp 5 = \pm 2$$ and $$\pm(8-9) = \pm 8 \mp 9 = \mp 1$$