Abby and Hakeem had the same number of CDs. After Abby gave away 28 CDs and Hakeem sold 17 CDs, the ratio of the number of Abby's CDs to the number of Hakeem's CDs became 2:3. How many CDs did they have altogether in the beginning?

To solve this problem, we need to set up the equation based on the information given and then solve for the total number of CDs Abby and Hakeem had in the beginning.

Let's assume the initial number of CDs both Abby and Hakeem had is "x".

After Abby gave away 28 CDs, she had "x - 28" CDs remaining.
After Hakeem sold 17 CDs, he had "x - 17" CDs remaining.

Now, the ratio of Abby's CDs to Hakeem's CDs is given as 2:3, which means (x - 28)/(x - 17) = 2/3.

To solve this equation, we can cross-multiply:

3 * (x - 28) = 2 * (x - 17)
3x - 84 = 2x - 34

Next, we can solve for "x" by moving all the terms involving "x" to one side of the equation:

3x - 2x = -34 + 84
x = 50

Therefore, Abby and Hakeem had a total of 50 + 50 = 100 CDs altogether in the beginning.

a = h

(a - 28) / (h-17) = 2/3
3 a - 84 = 2 h - 34
so
3 a - 2 h = 50
but we all know a = h so
a = h = 50
so they had 100

they both start with x CDs, and then

(x-28)/(x-17) = 2/3
find x, and then their starting total is 2x