Robert gave one-half of his marbles to Dean. Then he gave two-thirds of the remaining ones to Mark. If he ended up with 10, how many did he have when he stsrted?

starting with m marbles,

m/2 went to Dean
2/3(m-m/2) went to Mark

m - m/2 - 2/3 (m/2) = 10
m/6 = 10
m=60

starting with 60 marbles, he gave 30 to Dean, leaving 30. He gave 20 to Mark, leaving 10.