If the odds of an event are a: b it means that the ratio of the probability of the event taking place to the probability of the event not taking place is a: b. Denoting the probability of the event taking place as p, we have a/b = p / (1-p).
Here we are given the odds of getting a 6 as 2/5 for die A. In terms of the probability of it happening, (2/5) = p / (1-p) or (5/2) = (1/p) -1 or 1/p = 1+(5/2) = 7/2 or p = 2/7. Similarly the probability of getting a 6 for die B is 3/8.
To get a 12 when both the dice are thrown we need in 6 in both of them. The probability of this happening is the product of the individual probabilities. This is (2/7)*(3/8) = 3/28.
Therefore the odds of getting a 12 are 3:25.