How many boats did you hire? How many students did you have?

How many boats did you hire? How many students did you have?

A total of X boats were chartered
4x+2×4=6x-4
x=6
6x-4=32
A total of six ships were chartered
There are 32 students