If we set X1 = public donations and X2 = government match we can set the following relation:
X2 = 4/5X1 since the government donated $4 for every $5 of public donations.
The equation for total donations is as follows:
X1 + X2 = $22,814 since the total amount contributed is simply the sum of the government and public donations.
Substitute X2 from the first relation in this equation and you have:
X1 + 4/5X1 = $22,814
Solve this for X1:
1.8X1 = $22,814
X1 = $12,674.44
Then use this value to solve the first relation for X2:
X2 = 4/5X1
X2 = 0.8($12,764.44)
X2 = $10,139.56