I am interpreting this question as follows: the hour hand of A rotates through a full 30 degrees in an hour, and the minute hand of B rotates through a full 30 degrees plus the equivalent of two minutes (which is 1 degree) in an hour. If this is how you've interpreted it too, your answer's right: my thoughts are detailed below.
So, A goes at 30 deg/h and B goes at 31 deg/h. I'm safe to ignore the minute and second hands here: if the hour hands are in the same position, they show the same time. So the question is: how many hours have to elapse before A and B show the same time? If the number of hours that elapse is $x$, then the hands of A and B have rotated $30x$ and $31x$ degrees respectively. We want these to "show the same time". By this we mean that they should be equal, up to adding or subtracting integer multiples of 360 (because 360 degrees = a full revolution). So we want a solution to $30x = 31x + 360k$, for some integer k, and some x > 0 - in fact, we want $x$ to be as small as possible, because $x$ is in hours, and the question says "how long will it take?".
(However, clock A might not run correctly. But that's fine. If it goes at 53 deg/h, then B goes at 54 deg/h. This doesn't affect the solution.)