graph a function with following rules:

- local max at x=2
- local min at x=1
- does not have any concavity
- domain: [-3,3]

Sorry. Only a straight line has no concavity. So, given the min/max constraints,

y' = a(x-2)(x-1) = a(x^2-3x+2)
y"(2) < 0
y"(1) > 0
So, since y" = a(2x-3), at x=2, y" = a, so a < 0
That means we could have something like
y = -6(1/3 x^3 - 3/2 x^2 + 2x + C
= -2x^2 + 9x^2 - 12x + 5

see the graph at

https://www.wolframalpha.com/input/?i=-2x%5E3+%2B+9x%5E2+-+12x+%2B+5%2C+0%3C%3Dx%3C%3D3

If the concavity can be further clarified, maybe you can make the adjustments...