System of Equation-Portfolio Weights

Hi All-

I'm looking for help in trying to approach a work problem for changing the weights in a portfolio (user input) but it has been 12 years since I last took a math course I and I am at a loss of how to set up this problem. Basically, within the portfolio each position has a rating and a sector. What I am trying to do is figure the system of equation that would solve for the weights for each? An example would be the portfolio has a rating weight of 25% for positions rated 'X' and a sector weight of 3% for sector 'Y'. The weighting of positions with Sector 'Y' and Rating 'X' is .0075 (X*Y). Basically, I am trying to find what each position in both the Sector and Rating need to be changed by so that totals for each tie out to what a user inputs? For example if they changed the rating weight to 35% but left the sector weight the same what is the system of equations to solve for it? FYI...there are multiple ratings and sectors. Thanks in advance!! VM