Hey Crescent.

So basically you want Cov(X,Y) = E[XY] - E[X]E[Y] > 0 but Cov(f(X),g(Y)) = E[f(X)g(X)] - E[f(X)]E[g(X)] < 0

First consider the general situation where an increase in X results in an increase in Y. What about if you create a random variable where Y > X for all X?

Now for your f and g functions, all you have to do is apply a function using the above so that Y > X holds but f(X) < g(Y).

With regards to marginal probabilities, you might want to consider if you use the above template (i.e. something like Y > X) then how can you "scale" the PDF as the slices change as P(X = x) differs and for P(Y = y) changing as well.

Hint: Look at a symmetric PDF.