Two unknowns, direct system

Both conditions give remainders directly, leading to a straightforward system of two equations in two unknowns without any intermediate 'show that' step.

2 questions

CAIE P3 2023 November Q3
3 The polynomial \(2 x ^ { 3 } + a x ^ { 2 } + b x + 6\), where \(a\) and \(b\) are constants, is denoted by \(\mathrm { p } ( x )\). When \(\mathrm { p } ( x )\) is divided by \(( x + 2 )\) the remainder is - 38 and when \(\mathrm { p } ( x )\) is divided by \(( 2 x - 1 )\) the remainder is \(\frac { 19 } { 2 }\). Find the values of \(a\) and \(b\).
Edexcel C12 2015 June Q2
2. $$f ( x ) = x ^ { 4 } - x ^ { 3 } + 3 x ^ { 2 } + a x + b$$ where \(a\) and \(b\) are constants.
When \(\mathrm { f } ( x )\) is divided by \(( x - 1 )\) the remainder is 4
When \(\mathrm { f } ( x )\) is divided by \(( x + 2 )\) the remainder is 22
Find the value of \(a\) and the value of \(b\).