6. The functions \(f\) and \(g\) are defined by
$$\begin{aligned}
& \mathrm { f } : x \rightarrow 1 - a x , \quad x \in \mathbb { R }
& \mathrm {~g} : x \rightarrow x ^ { 2 } + 2 a x + 2 , \quad x \in \mathbb { R }
\end{aligned}$$
where \(a\) is a constant.
Find, in terms of \(a\),
- an expression for \(\mathrm { f } ^ { - 1 } ( x )\),
- the range of g .
Given that \(g f ( 3 ) = 7\),
- find the two possible values of \(a\).