Given:
Let the distance to the destination be \(d\) km.
Speed downstream (with current):
\[ \text{Speed}_{\text{down}} = 8 + 2 = 10 \text{ km/h} \]
Speed upstream (against current):
\[ \text{Speed}_{\text{up}} = 8 - 2 = 6 \text{ km/h} \]
Time taken:
\[ \text{Time}_{\text{down}} = \frac{d}{10} \text{ hours} \\ \text{Time}_{\text{up}} = \frac{d}{6} \text{ hours} \]
Total time equation:
\[ \frac{d}{10} + \frac{d}{6} = 2 \]
Combine fractions with a common denominator of 30:
\[ \frac{3d}{30} + \frac{5d}{30} = 2 \\ \frac{8d}{30} = 2 \\ 8d = 60 \\ d = \frac{60}{8} = 7.5 \text{ km} \]
The distance is 7.5 km.