When you know two sides and the angle between them, the so-called "side-angle-side" case, older textbooks would recommend using the law of tangents to find the remaining angles, if you don't want to bother finding the remaining side. I think that's what you mean by "directly" finding the other angles. This avoids having to use the law of cosines altogether: particularly useful before electronic calculators when you'd rather avoid calculating a square root, but even today the law of tangents can have better numerical performance (if $a$ and $b$ are similar and $\gamma$ is small then applying the law of cosines can produce errors by catastrophic cancellation).
Suppose $a>b$ and so $\alpha>\beta$. How much of the length of $BC = a$ would you have to redistribute to $AC =b$ to make them the legs of an isosceles triangle with apex at $C$? Cut off the half-difference $\frac{1}{2}(a-b)$ from $a$ and give it to $b$, then the lengths would be equalised to their half-sum (i.e. mean) value $\frac{1}{2}(a+b)$. You may want to check my claims that $a - \frac{1}{2}(a-b) = \frac{1}{2}(a+b)$ and $b + \frac{1}{2}(a-b) = \frac{1}{2}(a+b)$. Note that if I told you the half-sum and half-difference, these relations allow you to reconstitute the original lengths as $a = \frac{1}{2}(a+b) + \frac{1}{2}(a-b)$ and $b = \frac{1}{2}(a+b) - \frac{1}{2}(a-b)$. In general, given the half-sum and half-difference of any two quantities, the larger one was half-sum plus half-difference and the smaller one was half-sum subtract half-difference. Now, consider the ratio of the half-sum over the half-difference,
$$\frac{\frac{1}{2}(a-b)}{\frac{1}{2}(a+b)}$$
which shows the proportionate length change needed to equalise $a$ and $b$, relative to their mean length. This is a number between zero (already isosceles, no adjustment needed) and one (degenerate case where one length is zero and a full half of the other length must be donated to equalise them) that measures how asymmetric $\triangle ABC$ is when considered as a not-quite-isosceles triangle with apex $C$. Some textbooks cancel out the common factor of half in this fraction, others retain them because it gives the overall formula a more memorable symmetry.
Equalising the legs of the triangle would also equalise the base angles. Since the apex angle is still $\gamma$, the base angles still must sum to $\alpha + \beta$ for the angle sum of the triangle to work out. So the angles are also equalised to the half-sum $\frac{1}{2}(\alpha + \beta)$ and we must donate their half-difference $\frac{1}{2}(\alpha - \beta)$ from $\alpha$ to $\beta$ to achieve this. Again we can reconstitute $\alpha$ as the half-sum plus half-difference and $\beta$ as the half-sum subtract half-difference. Importantly, if you know $\gamma$ then the angle sum of a triangle tells you what the angle sum $\alpha + \beta$ must be, so you can easily work out the half-sum $\frac{1}{2}(\alpha + \beta)$. Finally, consider the ratio
$$\frac{\tan \frac{1}{2}(\alpha-\beta)}{\tan \frac{1}{2}(\alpha+\beta)}$$
which (since $\tan$ is an increasing function from zero to a right-angle, the range in which the angle half-sum and half-difference lie) must also be a number between zero and one, again describing how badly $\triangle ABC$ deviates from being isosceles with apex $C$.
The law of tangents just says these two measures of your triangle's asymmetry are equal.
$$\frac{\tan \frac{1}{2}(\alpha-\beta)}{\tan \frac{1}{2}(\alpha+\beta)} = \frac{\frac{1}{2}(a-b)}{\frac{1}{2}(a+b)}$$
In the SAS case where you know $a$, $b$ and $\gamma$, you can start by working out the angle half-sum $\frac{1}{2}(\alpha+\beta)$ so the only remaining unknown is the angle half-difference $\frac{1}{2}(\alpha-\beta)$. Then the law of tangents gives
$$\frac{1}{2}(\alpha-\beta) = \tan^{-1} \left( \frac{a-b}{a+b} \tan \frac{1}{2}(\alpha+\beta) \right)$$
where for ease of computation I didn't bother halving the sum and difference of the lengths. From the half-sum and half-difference, you can reconstitute $\alpha$ as half-sum plus half-difference and $\beta$ as half-sum subtract half-difference.
For an explicit formula in terms of $a$, $b$ and $\gamma$ only, let me write the angle sum of the triangle as $\alpha + \beta + \gamma = \pi$ (I'm working in radian measure, high schoolers may need to replace $\pi$ by $180^\circ$) so the half-sum is $\frac{1}{2}(\alpha + \beta) = \frac{1}{2}(\pi - \gamma)$ and
$$\alpha = \frac{\pi - \gamma}{2} + \tan^{-1} \left( \frac{a-b}{a+b} \tan \frac{\pi - \gamma}{2} \right)$$
$$\beta = \frac{\pi - \gamma}{2} - \tan^{-1} \left( \frac{a-b}{a+b} \tan \frac{\pi - \gamma}{2} \right)$$
Depending on taste, you may prefer to use the complementary trig functions to rewrite $\tan \frac{1}{2}(\pi - \gamma)$ as $\cot \frac{\gamma}{2}$.
Does this have any advantage compared to @g.kov's answer?
$$\alpha = \arccos\left(
\frac{b-a\cos\gamma}{\sqrt{a^2+b^2-2ab\cos\gamma}}
\right)$$
Without doing a full error analysis, let's check the case where I said numerical error could be worse for the law of cosines than the law of tangents: $a$ similar to $b$ and $\gamma$ small. In fact I'll put $a=b=1$ so the triangle is exactly isosceles and we should get $\alpha$ as $\gamma/2$ less than a right angle. Working in degrees on my pocket Casio calculator, the cosine formula displays 89.99950001
when $\gamma=10^{-3}$ instead of the exact 89.9995
, and 89.9999501
when $\gamma=10^{-4}$ instead of the exact 89.99995
. For $\gamma=10^{-5}$ and below, attempting the calculation produces a Math ERROR
. Note that the calculator stores additional digits beyond the ones it displays, used for rounding and to retain numerical accuracy in further calculations: subtracting the exact answer can reveal the error in these non-displayed digits. With the cosine formula there is already an error of magnitude $8.7 \times 10^{-11}$ when $\gamma = 0.1^\circ$. In contrast all the Casio's digits (both displayed and non-displayed) were exactly correct when using the tangent formula with $\gamma$ a small power of ten, until $\gamma = 10^{-11}$ degrees when a Math ERROR
was produced. This was caused by the $\tan \left( \frac{180^\circ - \gamma}{2} \right)$ which the Casio cannot evaluate for $\gamma = 10^{-11}$.