Can you explain this problem:

A ship and a raft start simultaneously down the stream from point A. the ship reached point B spent 18 hours there and started back to A. When it was 180 miles from A the second ship departed from A 40 hours later caught up with the raft that had traveled 144 miles by that time. the distance between A and B is 324 miles. The speed of the current is constant, the speed of the raft equals to the speed of the current the speeds of the ships in still water are equal. What are the speeds of the ships and the current?

I have no idea what to do. Help please?

A ship and a raft start simultaneously down the stream from point A. the ship reached point B spent 18 hours there and started back to A. When it was 180 miles from A the second ship departed from A 40 hours later caught up with the raft that had traveled 144 miles by that time. the distance between A and B is 324 miles. The speed of the current is constant, the speed of the raft equals to the speed of the current the speeds of the ships in still water are equal. What are the speeds of the ships and the current?

I have no idea what to do. Help please?