Let X be the money Mark had. Mark spent 1/2*X + 14 in the first store and 1/3*X + 16 in the second store.
Mark has X - 1/2*X - 14 - 1/3*X - 16 = $0 left.
Combining like terms, we get 1/6*X - 30 = $0.
Adding 30 to both sides and multiplying both sides by 6, we find that Mark had X = $180 when he entered the first store.
#### 180