Word problem

Experiencing a brain freeze here. There are two related word problems in the book I am reading. The first one I solved, the second one is giving me fits. The first problem reads:

How much water must be evaporated from 500 grams of a 10% salt solution in order to obtain a solution containing 15% salt?

My solution was to make x represent the amount of water to be evaporated. My equation was:

90% (500) - x = 85% (500 - x)

Solving: 450 - x = 425 - .85x
25 = .15x
x = 166 2/3 grams

which is correct.

The second question states:

Generalize Exercise 57 as follows: Let a, b, and d be positive real numbers with a < b < 100. Given a solution of d grams of salt water that is a% salt, how much water must be evaporated in order that the resulting mixture will be b% salt? Express the answer in terms of a, b, and d.