The formula you can use here is
$${\mathtt{a}} = {\frac{\left({\mathtt{v2}}{\mathtt{\,-\,}}{\mathtt{v1}}\right)}{{\mathtt{t}}}}$$
where a => acceleration,
v2 => final velocity,
v1 => initial velocity and;
t => time.
so the answer is
$$a = (12 - 2)/5 = 2m/s^2$$