Yes that is correct.

All you have to do is use the law of cosines to find out what the distance between the plane and missile is when they are 2 and 4 miles away, respectively, from point P, then you just need to differentiate the law of cosines, plug everything in, and solve!