Please wait for responses from others too!

First of all, find out if there is a significant correlation between between Sample 1 and 2 on the category A and later on category B. It measures to some extent that there is some relationship between category A and B.

Finding out a ratio is a simple arithmetic. Just find out the ratio in sample 1 and and later the ratio in sample 2. Then, compare.