kill(all)$

van=facebook.com/LearningCalculus$

f(w):=(4*w+5*w^2)/(w+2)$
g(w):=(3+w^2)*%i^2$

f(w)=g(w);

z:x+y*%i$

redReal(x,y):=''(fullratsimp(realpart(f(z))));
bluReal(x,y):=''(fullratsimp(realpart(g(z))));
redImag(x,y):=''(fullratsimp(imagpart(f(z))));
bluImag(x,y):=''(fullratsimp(imagpart(g(z))));

[[redReal(1,1),bluReal(1,1)],
 [redImag(1,1),bluImag(1,1)]];

is(equal(redReal(1,1), bluReal(1,1))) or
is(equal(redReal(1,1), bluReal(1,1)));