Nice problem!
Given:
shaded area equals 1/7 of A, and 3/8 of B.
Solution:
Let S=shaded area
For rectangle A,
Total area = S/(1/7)
=7S
Unshaded area
=total area - shaded
=7S - S
=6S
For rectangle B
Total area
= S/(3/8)
= 8S/3
Unshaded area
=total - shaded
=8S/3 - S
=5S/3
Total unshaded area = 6S + 5S/3 = (18+5)S/3 = 23S/3
Ratio of shaded to total unshaded
= S : 23S/3
SImplify
= 1 : 23/3