Without a picture, it is somewhat unclear.
I assume that the shaded is the area of the intersection of the two squares.
B:
Shaded : unshaded = 3 : 5
A:
Shaded : Unshaded = 9 : 17.
For squares A and B the ratio numbers for shaded area have different numbers. These two numbers represent the same area. This means that 3 (unit B) is the same as 9 (unit A).
What we could do, is to write the ratio for square B so that the shaded area has the same numerical value as for square A.
B:
Shaded : Unshaded = 3:5 = 9:15.
Now, the shaded areas for both A and B squares have the same value.
Then,
Shaded : Total unshaded = 9 : (17 +15)
The ratio of shaded and total unshaded area is 9:32.