We will try a form for the solution with some unknown parameters, and then see if we can find parameters that make it work. For example, let us guess that
$$
a_n = Ad^n
$$
for some constant numbers $d$ and $A$. Then we also need:
$$
a_{n+1} = Ad^{(n+1)}
$$
$$
a_{n+2} = Ad^{(n+2)}
$$
Then plug into our equation:
$$
Ad^{(n+2)} = \frac{Ad^{(n+1)}+Ad^n}{2}
$$
Every term is divisible by $Ad^n$, so cancelling that everywhere we get
$$
d^2 = \frac{d+1}{2}
$$
We can see that the recurrence relation is true if we can find a $d$ that satisfies this quadratic equation. Rearranging, we see that it is
$$
d^2-\frac{d}{2}-\frac{1}{2} = 0
$$
This quadratic factors nicely into
$$
(d-1)(d+1/2) = 0
$$
which is true when $d=1$ or $d=-1/2$. Now what this tells us is that if we take
$$
a_n = A1^n = A
$$
or
$$
a_n = A(-1/2)^n,
$$
we have a solution to the original problem. Recall that $A$ was an arbitrary constant that has not been determined yet, so it is possible that it is actually two different constants between the two cases above. To account for this, we write the second constant as $B$, giving two independent solutions
$$
a_n = A,\;\text{or}\;a_n=B(-1/2)^n
$$
Now, we can see that plugging in either solution solves the recurrence. What about their sum? You can work out that the sum of the two solutions is also a solution, so consider
$$
a_n = A + B(-1/2)^n
$$
This is the general solution. We figured out what the $d$ value was, now we have to figure out the $A$ and $B$ constants. Fortunately, we have some additional constraints:
$$
a_1 = a,\;a_2=b
$$
You should be able to take it from here to solve for $A$ and $B$, following what the other answers show.