Answer
6kph
Work Step by Step
First we need to find a formula that we can solve.
We have 6km at a speed of $(x-3)$kph and another 6km at a speed of $(x+3)$kph and the whole thing took 2 hours 40 min $(2\frac{2}{3}$hrs)
So our formula looks like this:
$\frac{6}{x+3}+\frac{6}{x-3} = 2\frac{2}{3}$
We need a common denominator so let's get that by multiplying the fractions by $(x-3)$ & $(x+3)$ respectively.
$\frac{6x-18}{(x+3)(x-3)} + \frac{6}{x-3} = 2\frac{2}{3}$
$\frac{6x-18}{(x+3)(x-3)} + \frac{6x+18}{(x+3)(x-3)} = 2\frac{2}{3}$
Now let's add them together:
$\frac{12x}{(x+3)(x-3)} = 2\frac{2}{3}$
$\frac{12x}{(x^2-9)} = 2\frac{2}{3}$
Now multiply by the denominator to both sides:
$12x = 2\frac{2}{3}x^2-24$
and then move everything to one side and we end up with:
$0 = 2\frac{2}{3}x^2-12x-24$
Now we just plug it into the quadratic equation:
$\frac{12\frac{+}{-}\sqrt (-12^2-(4*2\frac{2}{3}*-24))}{2*2\frac{2}{3}}$
$\frac{12\frac{+}{-}\sqrt (144-(4*2\frac{2}{3}*-24))}{5\frac{1}{3}}$
$\frac{12\frac{+}{-}\sqrt (144-(4*-64))}{5\frac{1}{3}}$
$\frac{12\frac{+}{-}\sqrt (144-(-256))}{5\frac{1}{3}}$
$\frac{12\frac{+}{-}\sqrt (144+256)}{5\frac{1}{3}}$
$\frac{12\frac{+}{-}\sqrt (400)}{5\frac{1}{3}}$
$\frac{12\frac{+}{-}20}{5\frac{1}{3}}$
and now we have two answers:
$\frac{-8}{5\frac{1}{3}}$ and $\frac{32}{5\frac{1}{3}}$
which equals $-1.5$ and $6$. We know the speed couldn't be negative, we require a positive number answer. So we are left with the answer $6$
We can even double check our work by plugging this answer into our original formula:
$\frac{6}{6+3}+\frac{6}{6-3} = 2\frac{2}{3}$
$\frac{2}{3}+\frac{6}{6-3} = 2\frac{2}{3}$
$\frac{2}{3}+2 = 2\frac{2}{3}$
$2\frac{2}{3} = 2\frac{2}{3}$ Perfect!