A gym sells $50 and $100 memberships. Last month, a total of 35 memberships were sold, earning $2,350. How many of each membership was sold?

Let x be the number of $50 memberships sold and y be the number of $100 memberships sold.

We can create a system of equations:
x + y = 35 (total number of memberships sold)
50x + 100y = 2350 (total earnings from memberships sold)

Solving this system of equations:
x + y = 35
50x + 100y = 2350

Multiply the first equation by 50:
50x + 50y = 1750
50x + 100y = 2350

Subtract the first equation from the second equation:
50y = 600
y = 12

Substitute y back into the first equation to solve for x:
x + 12 = 35
x = 23

Therefore, 23 $50 memberships and 12 $100 memberships were sold.