Let the speed of the boat in still water be b and the speed of the river be s, and let the one-way distance from P to Q be d. Since P to R takes 4 hours, P to Q takes 2 hours downstream, so d divided by (b+s) equals 2. The round trip from P to Q and back takes 10 hours, so d divided by (b+s) plus d divided by (b-s) equals 10, which simplifies to 2 plus d divided by (b-s) equals 10, meaning d divided by (b-s) equals 8. Dividing the equation d equals 2(b+s) by the equation d equals 8(b-s) yields 1 equals one quarter of (b+s) divided by (b-s), resulting in the proportion 4b minus 4s equals b plus s, so 3b equals 5s. Thus, the ratio of the speed of the boat in still water to the speed of the river is 5:3.