Let's call the amount a jug holds" #j#
:Let's call the amount a bottle holds: #b#
From the information in the problem we can write two equations:
Step 1) Solve the second equation for #J#:
#1j + 3b = 25"oz"#
#1j + 3b - color(red)(3b) = 25"oz" - color(red)(3b)#
#j + 0 = 25"oz" - 3b#
#j = 25"oz" - 3b#
Step 2) Substitute #(25"oz" - 3b)# for #j# in the first equation and solve for #b#:
#2j + 4b = 40"oz"# becomes:
#2(25"oz" - 3b) + 4b = 40"oz"#
#(2 xx 25"oz") - (2 xx 3b) + 4b = 40"oz"#
#50"oz" - 6b + 4b = 40"oz"#
#50"oz" + (-6 + 4)b = 40"oz"#
#50"oz" + (-2)b = 40"oz"#
#50"oz" - 2b = 40"oz"#
#50"oz" - color(red)(50"oz") - 2b = 40"oz" - color(red)(50"oz")#
#0 - 2b = -10"oz"#
#-2b = -10"oz"#
#(-2b)/color(red)(-2) = (-10"oz")/color(red)(-2)#
#(color(red)(cancel(color(black)(-2)))b)/cancel(color(red)(-2)) = 5"oz"#
#b = 5"oz"#
Step 3) Substitute #5"oz"# for #b# in the solution to the second equation at the end of Step 1 and calculate #j#:
#j = 25"oz" - 3b# becomes:
#j = 25"oz" - (3 xx 5"oz")#
#j = 25"oz" - 15"oz"#
#j = 10"oz"#
One Jug Holds: #10" ounces"#