3B. Let $a, b, c$ be the sides of a triangle. Determine the angle opposite side $c$, if

$$
(a+b+c)(a+b-c)=3 a b
$$
Solution. From the given equality, we get

$$
(a+b)^{2}-c^{2}=3 a b, \text { i.e. } a^{2}+b^{2}-c^{2}=a b
$$

From the cosine theorem, for the angle $\gamma$, opposite to $c$, we have $\cos \gamma=\frac{a^{2}+b^{2}-c^{2}}{2 a b}$, so

$$
\cos \gamma=\frac{a^{2}+b^{2}-c^{2}}{2 a b}=\frac{a b}{2 a b}=\frac{1}{2}
$$

Since $\gamma$ is an angle in a triangle, it holds that $0<\gamma<180^{\circ}$. Therefore, $\gamma=60^{\circ}$.