X grams of a% brine salt content: x*a% grams,
Salt content of y gram b% brine: y*b% gram,
therefore
After mixing, there are:
c%=(x*a%+y*b%)/(x+y),
Solve this relationship and you can get the answers you need.
Used for:
D.y=(b-c)/(c-a)x