Express function using transformations

A question is this type if and only if it asks to express one function in terms of another using transformation notation (e.g., express g(x) as f(x+p)+q).

2 questions

CAIE P1 2021 June Q6
6 Functions f and g are both defined for \(x \in \mathbb { R }\) and are given by $$\begin{aligned} & \mathrm { f } ( x ) = x ^ { 2 } - 2 x + 5
& \mathrm {~g} ( x ) = x ^ { 2 } + 4 x + 13 \end{aligned}$$
  1. By first expressing each of \(\mathrm { f } ( x )\) and \(\mathrm { g } ( x )\) in completed square form, express \(\mathrm { g } ( x )\) in the form \(\mathrm { f } ( x + p ) + q\), where \(p\) and \(q\) are constants.
  2. Describe fully the transformation which transforms the graph of \(y = \mathrm { f } ( x )\) to the graph of \(y = \mathrm { g } ( x )\).
CAIE P1 2022 November Q9
9 Functions f and g are both defined for \(x \in \mathbb { R }\) and are given by $$\begin{aligned} & \mathrm { f } ( x ) = x ^ { 2 } - 4 x + 9
& \mathrm {~g} ( x ) = 2 x ^ { 2 } + 4 x + 12 \end{aligned}$$
  1. Express \(\mathrm { f } ( x )\) in the form \(( x - a ) ^ { 2 } + b\).
  2. Express \(\mathrm { g } ( x )\) in the form \(2 \left[ ( x + c ) ^ { 2 } + d \right]\).
  3. Express \(\mathrm { g } ( x )\) in the form \(k \mathrm { f } ( x + h )\), where \(k\) and \(h\) are integers.
  4. Describe fully the two transformations that have been combined to transform the graph of \(y = \mathrm { f } ( x )\) to the graph of \(y = \mathrm { g } ( x )\).