If we let the coordinates of each ship be (x, y) with the positive directions of these coordinates corresponding to East and North, then the positions of the ships t hours after noon are
Ship A
(-180+35t, 0)
Ship B
(0, 30t)
The distance between them is the "Pythagorean sum" of the difference in their coordinates:
d = √((-180 +35t)² +(-30t)²)
= √(32400 -12600t +2125t²)
The rate of change of this distance is
dd/dt = (2125t -6300)/√(32400 -12600t +2125t²)
At 4 pm, the value of this rate of change is
(2125*4 -6300)/√(32400 -12600*4 +2125*4²)
= 2200/√16000
≈ 17.39 km/h
The distance between the ships is increasing at about 17.39 km/h at 4 pm.