well, if you add 3 at bats in the first game to 5 at bats in the second, that's a total of 8 times at bat, and if you add 2 hits in the first game to 0 in the second, that's a total of 2 hits. 2 out of 8 (2/8) is equivalent to 1 out of 4 (1/4), or 25%.
So the answer is Rafael got a hit 25% of the times he was at bat.