Math hard puzzles

Math hard puzzles difficult to solve it.
We have to find the value of A and B. A is any number whose thrice sum with itself is also A. Therefore, the sum of two A’s should be 0. This case is possible only for A = 0 or A = 5.
In this case if A = 0, the entire sum will be 0 and hence B = 0.
But this is not possible as it will lead to A = B
We know that different letters represent different digits. Therefore we take the case in which A = 5.
Hence A + A + A = 5 + 5 + 5 = 15
So we get B = 1.