Question 520167
Let {{{c}}} = speed of current  in mi/hr
Let {{{s}}} = dog's swimming speed in still water in mi/hr
Let {{{t}}} = dog's time swimming both upstream 
and downstream in hours
given:
{{{ s = 6 }}}
---------
Swimming upstream:
(1) {{{ 6 = ( s - c )*t }}}
(1) {{{ 6 = ( 6 - c )*t }}}
Swimming downstream:
(2) {{{ 18 = ( s + c )*t }}}
(2) {{{ 18 = ( 6 + c )*t }}}
---------------
(1) {{{ 6 = 6t - c*t }}}
(2) {{{ 18 = 6t + c*t }}}
Add the equations
{{{ 24 = 12t }}}
{{{ t = 2 }}}
and, since
(1) {{{ 6 = 6t - c*t }}}
(1) {{{ 6 = 6*2 - 2c }}}
(1) {{{ 2c = 12 - 6 }}}
(1) {{{ 2c = 6 }}}
(1) {{{ c = 3 }}}
The speed of the current is 3 mi/hr
check answer:
(2) {{{ 18 = ( 6 + c )*t }}}
(2) {{{ 18 = ( 6 + 3 )*2 }}}
(2) {{{ 18 = 9*2 }}}
(2) {{{ 18 = 18 }}}
and
(1) {{{ 6 = 6t - c*t }}}
(1) {{{ 6 = 6*2 - 3*2 }}}
(1) {{{ 6 = 12 - 6 }}}
(1) {{{ 6 = 6 }}}
OK