Sequence alignment scoring
If I am myself not mistaken, the table shows the paths of least resistance. There are many paths through this table and all of them are not shown only the ones that cost the least. You need to understand that a mismatch between the letters costs -1 (eg - AT), but an empty square  costs -2 (-A or -T). So your solution would cost = -1-3-4-3-2-4 which sums up too -17.
This is a full alignment table. The top value is going diagonal, the second value is going down and the third value is going right.