I don't remember a bit of calculus or precalculus, but this looks familiar:
This is called "Systems of Equations" solved with substitution (
http://www.sosmath.com/soe/SE/SE.html)
Trade fruit for variables:
Apples: x
Bananas: y
Coconuts: z
Here's how I did it:
x+x+x = 30
Simplify: 3x = 30
Bananas (y) in terms of x
x + 2y = 18
x = 18 - 2y
Solve for y using 3x = 30 (plug x value from bananas into 3x = 30 equation)
3(18-2y) = 30
(Use distributive property):
54-6y = 30
-6y = 30 - 54
-6y = -24
y = 4
Solve for z using y value (plug y value into y-z = 2 equation)
y - z = 2
4-z = 2
z = 2
Solve for x using x + 2y = 18
x + 2(4) = 18
x + 8 = 18
x = 10
Solve final portion of equation:
10 + 2 + 4 =16
Check:
3(10) = 30 (True!)
10 + 2(4) = 18 (True!)
4 - 2 = 2 (True!)