Use the abbreviated form of synthetic division where the middle row is omitted and the carry is done mentally.
| \(3\) | \(1\) | \(-2\) | \(-5\) | \(1\) | |
| \(1\) | \(3\) | \(4\) | \(2\) | \(-3\) | \(-2\) |
So \(q ( x ) = 3 x^3 + 4 x^2 + 2 x \,- 3\), the remainder \(r = \,- 2\) and \( f ( x ) = ( x - 1 ) (3 x^3 + 4 x^2 + 2 x - 3 ) - 2\).