We know:
Time = Distance/Speed
Given, the girl covers a distance of 6 km at a speed x km/ hr.
Time taken to cover first 6 km = 6/x
Also, the girl covers the remaining 6 km distance at a speed (x + 2) km/ hr.
Time taken to cover next 6 km = 6/(x+2)
Total time taken to cover the whole distance = 2 hrs 30 mins
Since, speed cannot be negative. Therefore, x = 4.