Since there are 2 x-intercepts, a first guess might be a quadratic function of the form y = a(x-1)(x-3), which contains the points (1,0) and (3,0).
Since (2, -1) has to be on the curve, -1 = a(1)(-1). So, a = 1.
This gives y = (x-1)(x-3). Plugging in the point (0,3), we see that (0,3) also lies on the curve.
A function which passes through the given points is f(x) = x2 - 4x + 3.