The answer is 84 pairs of pants.
Explanation:
According to the problem, she donated half of her pants to charity, which means she donated (1/2)x pairs of pants.
After donating half of her pants, she kept her 7 favorite pairs of pants. So, the number of pairs of pants she kept is 7.
The problem states that she was left with 35 pairs of pants after donating half of her pants and keeping her 7 favorite pairs. This means that the remaining number of pairs of pants is (x/2) - 7 = 35.
Solving for x, we get:
(x/2) - 7 = 35
x/2 = 42
x = 84
Therefore, Kim had 84 pairs of pants in the beginning.