Do you want to show that the (linear) relationship between a variable A and a variable B is stronger for one group than for another? If the answer is yes, then I would go for a regression analysis.
Suppose that there are two continuous variables $X$ and $Y$, and a group variable called $GENDER$ that is equal to 1 for men and equal to 0 for women. I would like to know if the relation between $X$ and $Y$ is different for men than for women. I would then run the following linear regression model:
$$Y = a + b*X + c*GENDER+ d*GENDER*X $$
I would then test the joint hypothesis if the coefficients $c$ and $d$ are equal to zero. If this hypothesis is rejected, then I would conclude that there are differences between men and women.
What do you think?
EDIT: I will add some more explanation, as requested, but I am afraid that this will take us too far away rom the original question ...
I have taken the original problem, and I have tried to give it some structure. More precisely, I have modeled the continuous variable Y as a function of another continuous variable X and a discrete variable called GENDER. The functional form chose here is a linear one. The lower case letters represent the parameters of the line.
In fact, the above equation looks like one line, but it contains two: one for men and one for women. The parameter a is the intercept for women, (a+c) is the intercept for men, b is the slope for women, and (b+d) is he slope for men.
The parameters c and d mirror the gender differences, or more generally speaking the differences between the two groups. I have used gender for illustrative purposes, but you can replace it by what you want: color, species, marital status, ... Thus, if these two parameters (c and d) are simultaneously equal to zero, there is no (apparent) difference between the two groups, and thus the relation between X and Y is the same for the two groups.
Your question is a perfect example of regression models with quantitative and qualitative predictors. Specifically, the three age groups -- $1,2, \& \,3$ -- are the qualitative variables and the quantitative variables are shopping habits and weight loss (I am guessing this because you are calculating correlations).
I must stress that this is much better way of modeling than calculating separate group-wise correlations because you have more data to model, hence your error estimates (p-values, etc) will be more reliable. A more technical reason is the resulting higher degrees of freedom in the t-test statistic for testing the significance of the regression coefficients.
Operating by the rule that $c$ qualitative predictors can be handled by $c-1$ indicator variables, only two indicator variables, $X_1, X_2$, are needed here that are defined as follows:
$$
X_1 = 1 \text{ if person belongs to group 1}; 0 \text{ otherwise} .
$$
$$
X_2 = 1 \text{ if person belongs to group 2}; 0 \text{ otherwise}.
$$
This implies that group $3$ is represented by $X_1=0, X_2=0$; represent your response -- shopping habit as $Y$ and the quantitative explanatory variable weight loss as $W$. You are now fit this linear model
$$
E[Y]=\beta_0 + \beta_1X_1 + \beta_2X_2 + \beta_3W.
$$
The obvious question is does it matter if we change $W$ and $Y$ (because I randomly chose shopping habits as the response variable). The answer is, yes -- the estimates of the regression coefficients will change, but the test for "association" between conditioned on groups (here t-test, but it is same as testing for correlation for a single predictor variable) won't change. Specficially,
$$
E[Y]= \beta_0 + \beta_3W \text{ -- for third group},
$$
$$
E[Y]= (\beta_0 + \beta_2)+\beta_3W \text{ -- for second group},
$$
$$
E[Y]= (\beta_0 + \beta_1)+\beta_3W \text{ -- for first group},
$$
This is equivalent to having 3 separate lines, depending on the groups, if you plot $Y$ vs $W$. This is a good way to visualize what you are testing for makes sense (basically a form of EDA and model checking, but you need to distinguish between grouped observations properly). Three parallel lines indicate no interaction between the three groups and $W$, and a lot of interaction implies these lines will be intersecting each other.
How do the tests that you ask. Basically, once you fit the model and have the estimates, you need to test some contrasts. Specifically for your comparisons:
$$
\text{Group 2 vs Group 3: } \beta_2 + \beta_0 - \beta_0 = 0,
$$
$$
\text{Group 1 vs Group 3: } \beta_1 + \beta_0 - \beta_0 = 0,
$$
$$
\text{Group 2 vs Group 1: } \beta_2 + \beta_0 - (\beta_0+\beta_1) = 0.
$$
Best Answer
If one variable (A or B) is "dependent" and the other is "independent" then you could use regression with all the demographic variables in the equation as well, and possibly interactions between the main independent variable and the demographic variables.
The former will control for the effects of the the demographic variables; the latter will, in addition, look for differences in the relationship between A and B at different levels of the demographic variables.