Speed is the ratio of distance traveled and time taken for the journey. It can also be written as:
speed = distance traveled/time taken
In this case, the Queen Elizabeth the second or QEII travels a distance of 3840 miles in 5 days (or 120 hours, as given). Hence, the average speed of the ship is:
average speed = 3840 miles / 5 days = 768 miles/day
or, = 3840 miles / 120 hrs = 32 miles/hr.
This value is close to the actual average speed of QEII during her service years.
Note that speed is not the same as velocity, since speed is the ratio of distance traveled and time taken; while the velocity is a ratio of displacement and time taken. Speed is a scalar quantity, while velocity is a vector quantity.
Hope this helps.