If the ship is traveling at the speed of X kilometers per hour in still water, and the current speed is Y kilometers per hour, then the speed of the ship sailing against the current is (X-Y) kilometers per hour. The time for sailing 50 kilometers is: 50/(X-Y) hours.
Downstream speed = ship speed+current speed = ship speed-current speed.