Let the distance where the defender and the prisoner met be D.

Then the distance the defender ran = D

Then, the distance the prisoner ran = D-27

The number of steps that the defender ran to D is x steps.

The number of steps that the prisoner ran to D is y steps.

2 steps of the defender = 5 steps of the prisoner.

==> 2x = 5 y

==> y= (2/5)x..............(1)

The defender run at a speed of 5 steps.

==> The defender's speed S1= 5x

The prisoner run at a speed of 8 steps.

The prisoner speed S2 = 8y

But y= (2/5)x

==> S2 = 8*(2/5)x = (16/5)x

Now we will determine the distance.

We will assume that the time is 1 unit.

==> D= S1 * T

==> D = 5x ..............(1)

Now we will determine the distance the prisoner ran,

==> D-27 = S2*T

==> D-27 = (16/5)x

==> D = (16/5) x + 27 ..............(2)

Now from (1) and (2).

==> 5x = (16/5)x + 27

==> 5x - (16/5)x = 27

==> (9/5)x = 27

==> x = 27*5/9 = 3*5 = 15

**Then, the number of steps the defender ran is 15 steps.**