Question 1065431
there is no information about the distance, so
I will call it {{{ 1 }}} unit of distance ( miles or whatever )
------------------------
Let {{{ s }}} = Mary's speed swimming in still water
Let {{{ c }}} = the speed of the current
Going upstream:
(1) {{{ 1 = ( s - c )*6 }}}
(1) {{{ s - c = 1/6 }}}
Going downstream:
(2) {{{ 1 = ( s + c )* 3 }}}
(2) {{{ s + c = 1/3 }}}
------------------------
Note that the rates are in  units / min
Add (1) and (2)
(1) {{{ s - c = 1/6 }}}
(2) {{{ s + c = 1/3 }}}
----------------------
{{{ 2s = 1/6 + 2/6 }}}
{{{ 2s = 1/2 }}}
{{{ s = 1/4 }}}
and
(2) {{{ s + c = 1/3 }}}
(2) {{{ 1/4 + c = 1/3 }}}
(2) {{{ c = 4/12 - 3/12 }}}
(2) {{{ c = 1/12 }}}
------------------------------------
Let {{{ t[1] }}} = time in minutes to swim 
upstream 1 unit of distance
Let {{{ t[2] }}} = time in minutes to float
downstream 1 unit of distance
-------------------------------------
Swimming upstream:
(3) {{{ 1 = ( 1/4 - 1/12 )*t[1] }}}
(3) {{{ 1 = ( 1/6 )*t[1] }}}
(3) {{{ t[1] = 6 }}} min
Floating downstream:
(4) {{{ 1 = (1/12)*t[2] }}}
(4) {{{ t[2] = 12 }}}
-----------------------
{{{ t[1] + t[2] = 6 + 12 }}}
{{{ t[1] + t[2] = 18 }}}
The round trip takes 18 min
----------------------------
Check the math, and get another
opinion if needed