Answer: Let's assume the speed of the boat is "b" miles per hour (mph) and the speed of the current is "c" mph.
When going with the current, the effective speed of the boat is the sum of its speed and the speed of the current, so the time taken is given by:
Time = Distance / Effective Speed
3 hours = 12 miles / (b + c)
When going against the current, the effective speed of the boat is the difference between its speed and the speed of the current, so the time taken is given by:
Time = Distance / Effective Speed
4 hours = 12 miles / (b - c)
Now, we have a system of equations:
3 = 12 / (b + c)
4 = 12 / (b - c)
We can solve this system to find the values of "b" and "c."
First, let's simplify equation (1):
3(b + c) = 12
b + c = 4
Next, let's simplify equation (2):
4(b - c) = 12
b - c = 3
Now, we have a system of linear equations:
b + c = 4
b - c = 3
We can solve this system by adding the two equations:
(b + c) + (b - c) = 4 + 3
2b = 7
Now, solve for "b":
b = 7 / 2
b = 3.5 mph
Now that we have the speed of the boat "b," we can find the speed of the current "c" by substituting the value of "b" into one of the original equations. Let's use equation (1):
3 = 12 / (3.5 + c)
Now, solve for "c":
3(3.5 + c) = 12
10.5 + 3c = 12
3c = 12 - 10.5
3c = 1.5
c = 1.5 / 3
c = 0.5 mph
So, the speed of the boat is 3.5 mph, and the speed of the current is 0.5 mph.