Three scientists are observing Rickey and Riley, laboratory rats, to see how long each rat takes to find a piece of cake in a maze. The maze is a large box with open pathways running north-south and east-west in a grid pattern. Riley takes the direct route by traveling three rows north, turning right and traveling two columns east, proceeding four rows north and turning right for one column. He is one row south of the cake when the bell goes off. Rickey, on the other hand, fumbles his way along. He enters at the same gate as Riley and advances twelve rows north. He then becomes confused and does an about-face, and moves eight rows south along the same path. Then he moves left one column and north one row. Finally he makes a right turn and moves four columns to the east. How far away from the cake is Rickey if the bell goes off at this point?

To determine how far away Rickey is from the cake when the bell goes off, we need to calculate the distance between his current position and the cake in the maze.

1. First, let's break down the maze movements for both rats:
- Riley: 3 rows north, 2 columns east, 4 rows north, 1 column east.
- Rickey: 12 rows north, 8 rows south on the same path, 1 column left, 1 row north, 4 columns east.

2. Now, let's calculate Rickey's position in terms of rows and columns:
- Rickey moved 12 rows north and then went back 8 rows south, so he effectively moved 12 - 8 = 4 rows north.
- Rickey moved 1 column left and 4 columns east, so he effectively moved 4 - 1 = 3 columns east.

3. Adding up Rickey's effective movements, we find that he is located 4 rows north and 3 columns east from his starting point.

4. Next, let's determine the position of the cake:
- Riley is one row south of the cake when the bell goes off. Since the cake is in the same column as Riley's final position, we can find the cake 1 row north from Riley's final position.

5. Combining Riley's and Rickey's positions, we find that the cake is 1 row north and Riley is 4 rows north and 3 columns east.

6. To calculate the distance between Rickey and the cake, we can use the Pythagorean theorem, given that the maze is laid out in a grid pattern.
- The horizontal distance (in columns) between Rickey and the cake is 3 columns.
- The vertical distance (in rows) between Rickey and the cake is 1 row.

7. Using the Pythagorean theorem, we can calculate the distance:
Distance = sqrt((vertical distance)^2 + (horizontal distance)^2)
Distance = sqrt((1)^2 + (3)^2)
Distance = sqrt(1 + 9)
Distance = sqrt(10)

Therefore, Rickey is approximately sqrt(10) units away from the cake when the bell goes off in the maze.