25 22 19 bytes
Try it online!, or watch it at the fish playground!
A brief overview of ><>: it's a 2D language with a fish that swims through the code, executing instructions as it goes. If it reaches the edge of the code, it wraps to the other side. The fish starts in the top left corner, moving right. Randomness is tricky in ><>: the only random instruction is
x, which sets the fish's direction randomly out of up, down, left and right (with equal probability).
At the start of the program, the fish reads in two characters of input with
i reads a character from STDIN to the stack, and
_ is a horizontal mirror, which the fish ignores now). It then reaches an
x sends the fish rightwards, it reads in one more character (the third), prints it with
o and halts with
;. The left direction is similar: the fish reads two more characters (so we're up to the fourth), wraps around to the right, prints the fourth character and halts. If the fish swims up, it wraps and prints the second character, before being reflected right by
/ and halting. If it swims down, it gets reflected left by the
/ and hits another
This time, two directions just send the fish back to the
x (right with an arrow,
<, and up with a mirror,
_). The fish therefore has 1/2 chance of escaping this
x in each of the other two directions. Leftwards prints the top character on the stack, which is the second one, but downwards first swaps the two elements on the stack with
$, so this direction prints the first character.
In summary, the third and fourth characters are printed with probability 1/4 each; the first character has probability 1/2 x 1/4 = 1/8; and the second character has probability 1/4 + 1/2 x 1/4 = 3/8.