
Actually Welcome to the Concept of the variables and linear equation.
let the cost of coffee be x and cost of muffin be y.
=> Let the first equation be => 2x + 2y = 16
=> Let the second equation be => 2x + 4y = 20
let's, reduce first eqn ==> x + y = 8 , then x = y-8
now we substitute value of x in second equation,
2(8-y) + 4y = 20
==> -2y + 4y +16 = 20.
==> 2y = 4
==> y = 2
hence, now x = 8-2 ==> 6 ,
so the cost of a Coffee = 6
cost of a muffin = 2
Cost of a muffin = 6