(i) Use the tangent addition formula: \(\tan(A + B) = \frac{\tan A + \tan B}{1 - \tan A \tan B}\).
For \(\tan(45^\circ + x)\):
\(\tan(45^\circ + x) = \frac{\tan 45^\circ + \tan x}{1 - \tan 45^\circ \tan x} = \frac{1 + \tan x}{1 - \tan x}\)
Substitute into the equation:
\(\frac{1 + \tan x}{1 - \tan x} - \tan x = 2\)
Multiply through by \(1 - \tan x\):
\(1 + \tan x - \tan x(1 - \tan x) = 2(1 - \tan x)\)
\(1 + \tan x - \tan x + \tan^2 x = 2 - 2\tan x\)
\(1 + \tan^2 x = 2 - 2\tan x\)
Rearrange to obtain:
\(\tan^2 x + 2\tan x - 1 = 0\)
(ii) Solve the quadratic equation \(\tan^2 x + 2\tan x - 1 = 0\).
Using the quadratic formula \(\tan x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\), where \(a = 1, b = 2, c = -1\):
\(\tan x = \frac{-2 \pm \sqrt{2^2 - 4 \times 1 \times (-1)}}{2 \times 1}\)
\(\tan x = \frac{-2 \pm \sqrt{4 + 4}}{2}\)
\(\tan x = \frac{-2 \pm \sqrt{8}}{2}\)
\(\tan x = \frac{-2 \pm 2\sqrt{2}}{2}\)
\(\tan x = -1 \pm \sqrt{2}\)
For \(\tan x = -1 + \sqrt{2}\), \(x = 22.5^\circ\).
For \(\tan x = -1 - \sqrt{2}\), \(x = 112.5^\circ\).
Thus, the solutions are \(x = 22.5^\circ\) and \(x = 112.5^\circ\).