There are:
l? =(20x)? +(50- 10x)?
=400x? +2500- 1000x+ 100x?
=500(x? -2x+5)
=500[(x- 1)? +4]
It can be seen that when x= 1, the distance between two ships is the shortest.