There are a number of ways to do this, including brute force and calculus, but since you already found out the rather nice geometric interpretation as the sum of the distances from the given points, let's do that.
A few things will come in handy here.
- The line on which $A$ and $B$ lie is $y=x+3$, which is parallel to your line of interest (i.e. $y=x+2$).
- Both lines have slope $1$.
Here's the general idea: Note that the sum of the distances is minimum along the perpendicular bisector of the line segment $AB$; the actual minimum is at the point of intersection of the bisector and $y=x+3$, but since you have an additional constraint, you find the intersection of the bisector with $y=x+2$, call it $C$.
Note that if you drop perpendiculars to $x$ and $y$ axes respectively from $A$ and $B$, they intersect at $A'=(0,2)$ and $B'=(2,4)$. You'll notice that their mid point is $C$. Then $C$ turns out to be $(1,3)$. That gives us that $\alpha=20$.