Replace A, B by suitable numerals.
First look at the left column, which is:
This implies that the maximum value of A can be 3.
$A \leq 3$ ....(1)
The next column has the following:
To reconcile this with equation (1), borrowing is involved.
$\therefore A=2$ and $B=5$