The chemical reaction involved are expressed as:
NaCl + AgNO3 = NaNO3 + AgCl
KBr + AgNO3 = KNO3 + AgBr
The amount of AgNO3 that reacted with the solution reacts with the two components in the solution thus the total amount is the sum of the amount reacted with NaCl (x) and amount reacted with KBr (y)
0.08765 M AgNO3 ( .04030 L ) = 3.5323 x10^-3 mol AgNO3
3.5323 x10^-3 = x + y
We have two unknowns so we need to set up one more equation to solve this problem.
0.3146 g = mass NaCl + mass KBr
0.3146 = x ( 1 mol NaCl / 1 mol AgNO3 ) ( 58.44 g / 1 mol ) + y ( 1 mol KBr / 1 mol AgNO3 ) ( 119 g / 1 mol )
0.3146 = 58.44x + 119y
Solving for x and y,
x = 1.7461 x10^-3 mol AgNO3 reacts with NaCl
y = 1.7862 x10^-3 mol AgNO3 reacts with KBr
mass of NaCl = 58.44x = 0.1020 g
% NaCl = 0.1020 / 0.3146 x 100 = 32.44%