Let F = cost of French silk cakes and C = #cost of choc marble
Beth: 7F + 10C = 316
Allyah: 5F + 5C = 185
It is a toss up whether to use elimination or substitution.
Probably easier to double Allyah's equation and eliminate the C by subtracting Beth's
10F + 10C = 370
7F + 10C = 316
3F = 54 => F = 18
Now divide Allyah's equation by 5 and
then F + C = 37 => C = 19.
Now check your answers!