$S_1 = \sqrt{x^2 + a^2}$
$S_2 = \sqrt{(c - x)^2 + b^2}$
Total distance traveled by light:
$S = S_1 + S_2$
$S = \sqrt{x^2 + a^2} + \sqrt{(c - x)^2 + b^2}$
$\dfrac{dS}{dx} = \dfrac{2x}{2\sqrt{x^2 + a^2}} + \dfrac{2(c - x)(-1)}{2\sqrt{(c - x)^2 + b^2}}$
$\dfrac{x}{\sqrt{x^2 + a^2}} = \dfrac{c - x}{\sqrt{(c - x)^2 + b^2}}$
$x\sqrt{(c - x)^2 + b^2} = (c - x)\sqrt{x^2 + a^2}$
$x^2 \, [ \, (c - x)^2 + b^2 \, ] = (c - x)^2 (x^2 + a^2)$
$x^2 (c - x)^2 + b^2 x^2 = x^2 (c - x)^2 + a^2 (c - x)^2$
$b^2 x^2 = a^2 (c^2 - 2cx + x^2)$
$b^2 x^2 = a^2 c^2 - 2a^2 cx + a^2 x^2$
$(a^2 - b^2)x^2 - 2a^2 cx + a^2 c^2 = 0$
By Quadratic Formula:
A = a2 - b2; B = -2a2c; C = a2c2
$x = \dfrac{-B \pm \sqrt{B^2 - 4AC}}{2A}$
$x = \dfrac{2a^2 c \pm \sqrt{4a^4 c^2 - 4(a^2 - b^2)(a^2 c^2)}}{2(a^2 - b^2)}$
$x = \dfrac{2a^2 c \pm \sqrt{4a^4 c^2 - 4a^4 c^2 + 4 a^2 b^2 c^2}}{2(a^2 - b^2)}$
$x = \dfrac{2a^2 c \pm 2abc}{2(a^2 - b^2)}$
$x = \dfrac{ac(a \pm b)}{(a - b)(a + b)}$
For
$x = \dfrac{ac(a + b)}{(a - b)(a + b)}$
$x = \dfrac{ac}{a - b}$ meaningless if a > b
For
$x = \dfrac{ac(a - b)}{(a - b)(a + b)}$
$x = \dfrac{ac}{a + b}$ okay
Use
$x = \dfrac{ac}{a + b}$
when S is minimum:
$c - x = c - \dfrac{ac}{a + b}$
$c - x = \dfrac{(a + b)c - ac}{a + b}$
$c - x = \dfrac{ac + bc - ac}{a + b}$
$c - x = \dfrac{bc}{a + b}$
$\tan \alpha = \dfrac{a}{x}$
$\tan \alpha = \dfrac{a}{\dfrac{ac}{a + b}}$
$\tan \alpha = \dfrac{a + b}{c}$
$\tan \beta = \dfrac{b}{c - x}$
$\tan \beta = \dfrac{b}{\dfrac{bc}{a + b}}$
$\tan \beta = \dfrac{a + b}{c}$
tan α = tan β, thus, α = β (okay!)