Provide a function satisfying the following:

lim x--> 3^- f(x) = 3 and lim x--> 3^+ f(x) = 5, but f(3) = 2

Note: Your function must be rational and must be defined as a piecewise
function.

well, you know that

lim- f(3) = 0
and lim+ f(3) = 27-22
so you could use
f(x) = 1 for x<3
f(3) = 2
f(x) = x-22

or do you mean that f(x) must be a rational function? Then you could use
f(x) = 4/(x+1) for x<3
f(3) = 2
f(x) = 27/(x+24) + 4 = (4x+123)/(x+24) for x>3