A polynomial \( p(x) \) leaves a remainder of \( -2 \) when divided by \( x - 2 \) and a remainder of \( 5 \) when divided by \( x + 1 \). Let \( r(x) \) be the remainder when \( p(x) \) is divided by \( (x - 2)(x + 1) \). Find \( r(3) \). Let's think step by step and output the final answer within \boxed{}.
user