Let \( A \) be the amount of money Alice has, and \( B \) be the amount of money Bob has. We have two scenarios based on the transfers of \( n \) dollars:
-
Alice receives \( n \) dollars from Bob:
- After this transaction, Alice's new amount will be \( A + n \) and Bob's will be \( B - n \).
- According to the problem, we have: \[ A + n = 3(B - n) \]
-
Alice gives \( n \) dollars to Bob:
- After this transaction, Alice's new amount will be \( A - n \) and Bob's will be \( B + n \).
- According to the problem, we have: \[ A - n = 2(B + n) \]
Now we will simplify both equations.
Simplifying the equations
From the first equation: \[ A + n = 3(B - n) \] Expanding this gives: \[ A + n = 3B - 3n \] Rearranging terms results in: \[ A + n + 3n = 3B \] \[ A + 4n = 3B \quad (1) \]
From the second equation: \[ A - n = 2(B + n) \] Expanding this gives: \[ A - n = 2B + 2n \] Rearranging terms results in: \[ A - n - 2n = 2B \] \[ A - 3n = 2B \quad (2) \]
Solve the system of equations
Now we have the system:
- \( A + 4n = 3B \)
- \( A - 3n = 2B \)
We will express \( A \) in terms of \( B \) and \( n \) from both equations:
From equation (1): \[ A = 3B - 4n \]
From equation (2): \[ A = 2B + 3n \]
Setting these two expressions for \( A \) equal to each other: \[ 3B - 4n = 2B + 3n \]
Now, solving for \( B \): \[ 3B - 2B = 4n + 3n \] \[ B = 7n \]
Next, substituting \( B \) back into one of the expressions for \( A \): Using \( A = 2B + 3n \): \[ A = 2(7n) + 3n = 14n + 3n = 17n \]
Find the ratio \( \frac{A}{B} \):
Now we have \( A = 17n \) and \( B = 7n \): \[ \frac{A}{B} = \frac{17n}{7n} = \frac{17}{7} \]
Thus, the ratio of the amount of money Alice has to the amount Bob has is: \[ \boxed{\frac{17}{7}} \]