If the rods P and Q repel each other, that means they have the same charge signs (both are positive or both are negative)
Since the rods P and R attract each other, that means they have opposite charge signs (one is positive and the other is negative).
Looking at the options, the only one that can represent the signs of the charges on the rods is the third option. (P and Q have the same charge sign, P and R have different charge signs)