I have trouble figuring out which statistical test for differences between two groups to choose from:

I have two groups, A and B.

For each group member I measured a value X and shortly after a value Y. These values depend on each other. I calculated the difference between value X and Y as a percentage. Now I would like to check, wheter this percentage in change is different between group A and B. The distribution of both X and Y are non-gaussian. The sample size is only about 40.

*I was thinking about using the Wilcoxon signed rank test to test the differences for X and Y for each group. But if I want to test wether the percentage differs, do I have to use a test for non-independent samples?!*

I would really appreciate any help!