That always depends of the information given. For example, if we have the following expression:

if we make x=3, we would have y=3+3=9, or if we make x=0, then y=0+3=3. In this case, 'y' is the dependent variable, because it changes depending of the value of 'x' that we choose.
However, if we do this to the previous expression:

Then 'x' becomes de dependent variable, since now its value depends on what happens to y-3 for each value of y that we choose