We will use x and y variables to help calculate the number of ships
x = variable for amount of ships with 4 masts
y = variable for amount of ships with 3 masts
Mollie saw a total of 30 masts on 8 ships.
Based on this, we can conclude that:
• x + y = 8 (x amount of 4 mast ships + y amount of 3 mast ships)
• 4x + 3y = 30 (the amount of masts she saw)
From these 2 equasions we can calculate the amount of ships. We will use the first equasion and put x on the right side of the equasion so we get the approximate value of y:
![x + y = 8 \\ y = 8 - x](https://img.qammunity.org/2019/formulas/mathematics/middle-school/yne59gx1y5fmi5ba0mckhja2s5i8o71nbj.png)
Now we insert (8 -x) into our second equasion in the place of y and calculate it:
![4x + 3(8 - x) = 30 \\ 4x + 24 - 3x = 30 \\ 4x - 3x = 30 - 24 \\ x = 6](https://img.qammunity.org/2019/formulas/mathematics/middle-school/cxscsc73v15exahl5g8pkv4t4e8emhs56k.png)
RESULT: There were 6 ships with 4 masts