Where am I wrong in this algebraic equation? The question is:

Some sweets were to be distributed equally among 175 people. When 35 people were not present, everyone got an extra sweet. How many sweet were available for distribution?

My solution is:
Let $x$ = number of sweets each one gets. Then, $175x = 140 (x+1)$. Solving we get $x = 4$. So the total number of sweets available is $175 \times 4= 700$.
The answer in my book is given as $2800$. Where am I wrong? Or am I right? Thank you.
Update:- This is the solution given in my book:-( 7th)

Where is the book's solution wrong?
 A: Are you sure that the answer in your book is correct? Just think about it. $2800\div175=16$. So, each person gets 16 sweets. Then, $2800\div(175-35)=20$. This, on the other hand, says that each person will get $4$ extra sweets if we subtract 35 people from the original number of people that were present. In your problem, however, it is stated that each person in that case should receive only one extra sweet. Do you see the problem? The answer in your book just can't be the solution to the original question. But actually your solution, $700$ sweets, is the correct one. I get the same answer.
Here's my solution:
Let $x$ be the total number of sweets. Then, $\frac{x}{175}$ is the number of sweets each person gets when there are 175 people. Likewise, $\frac{x}{140}$ is the number of sweets each person gets when there are only $175-35=140$ people. From what it says in the problem, we know that $\frac{x}{140}$ should be equal to $\frac{x}{175} + 1$ because when there were only $140$ people, everybody got one more sweet than when there were $175$ people. In other words, the number represented by $\frac{x}{140}$ is bigger than the number represented by $\frac{x}{175}$ by exactly one. Thus, we arrive at the equation $\frac{x}{140}=\frac{x}{175} + 1$ which we need to solve for $x$ whose value is going to be our total number of sweets that were available for distribution:
$$
\frac{x}{140}=\frac{x}{175} + 1\implies\\
\frac{x}{140}-\frac{x}{175}=1\implies\\
175x-140x=140\cdot 175\implies\\
35x=24,500\implies\\
x=\frac{24,500}{35}\implies\\
x=700
$$
Answer: $700$ sweets were available for distribution.
