The problem does not mention what level tanks A and B were filled to before the leak. I'll assume that the tanks were filled as the figure shows.
Part (a)
Initial volume of water of tank A is
20 cm * 36 cm * 40 cm = 28,800 cm^3
Initial volume of water in tank B is
30 cm * 36 cm * 9 cm = 9,720 cm^3
The total combined water in tanks A and B is
28,800 cm^3 + 9,720 cm^3 = 38,520 cm^3
Now the water is in tanks A and B.
The area of the base of the entire tank (A & B) is
50 cm * 36 cm = 1,800 cm^2.
The total volume of water in tanks A and B evenly (same height) distributed
into tanks A and B has a height
(38,520 cm^3)/(1,800 cm^2) = 21.4 cm
Part (b)
The volume of water in tank B, after the water in both tanks is at the same level, is
30 cm * 36 cm * 21.4 cm = 23,112 cm^3
Tanks B already contained 9,720 cm^3, so the amount of water that flowed from tank A to tank B was
23,112 cm^3 - 9,720 cm^3 = 13,392 cm^3
1 1/2 h = 90 min
(13,392 cm^3)/(90 min) = 148.8 cm^3/min