Transformation of functions under bijections of domain and codomain Let $f:X\to Y$ be a function, for simplicity, of sets. I want to understand how the function transforms under a transformation of domain/codomain.
Let me start from what I deem to understand well enough: assume $g:X\to X$ is a bijection. If I view the function as a section,
$\sigma : X\to X\times Y$, then I have the fundamental equations
$$
\pi_X\circ \sigma = \mathbb{1}_X \  \ \text{and} \ \ \pi_Y\circ \sigma = f,
$$
where a section, by definition always satisfies $\pi_X\circ \sigma =\mathbb{1}_X$. I see my goal as constructing a new section given the old section and $g:X\to X$.
Acting with $g$ on the left of $\pi_X\circ \sigma =\mathbb{1}_X$, I get
$$
g\circ \pi_X\circ \sigma =g,
$$
in order to get the fundamental relation that sections satisfy, I act with $g^{-1}$ on the right of the above equation, getting
$$
g\circ \pi_X\circ \sigma \circ g^{-1} =\mathbb{1}_X.
$$
The other equation gives us
$$
\pi_Y\circ \sigma \circ g^{-1}=f\circ g^{-1}
$$
Defining $g\circ \pi_X = \tilde{\pi}_X$, I see that the transformed section is 
$$
\tilde{\sigma}=\sigma \circ g^{-1}.
$$
In other words, under a bijection of the domain, a function transforms as
$\sigma \mapsto \tilde{\sigma}(x)=(x,f(g^{-1}(x)))$.
As an example of the above, if $g:x\mapsto x+\epsilon$ is a bijection of the domain, then any function $$f(x) \mapsto \tilde{f}(x):=f(x-\epsilon)$$.
Similarly if I also transform the codomain Y, seperately from the domain, X; namely, if I have along with $g:X\to X$ also an $h:Y\to Y$ then following the same reasoning as above I get that
$$
\sigma \mapsto \tilde{\sigma}(x)=(x,h(f(g^{-1}(x)))).
$$
In other words if $g:x\mapsto x+\epsilon$ and $h:y\mapsto e^\epsilon y$, then a function $f$ transforms according to
$$
f(x)\mapsto \tilde{f}(x):=e^\epsilon f(x-\epsilon).
$$

Here is my question, how does a function transform if we have a bijection $$
G:X\times Y \to X\times Y
$$
  where because the domain is a product, there is no way to "seperate" the mixing of $X$ and $Y$.

 A: This is basically what you did in the first part of the question:
Given a diagram:
$$\begin{array}{c}
X & \overset f \longrightarrow & Y \\
{\small \sim} {\Large\downarrow} {\small g} && {\small \sim} {\Large\downarrow} {\small h} \\
X && Y
\end{array}$$
Construct the new morphism $\tilde f : X \to Y$ that fills in the gap of the commuting diagram:
$$\begin{array}{c}
X & \overset f \longrightarrow & Y \\
{\small \sim} {\Large\downarrow} {\small g} && {\small \sim} {\Large\downarrow} {\small h} \\
X & \overset {\tilde f} \longrightarrow & Y
\end{array}$$
And it is explicitly constructed:
$$\tilde f = h \circ f \circ g^{-1}$$
And the reasoning through products is summarized in this diagram:
$$\begin{array}{c}
& X & \\
& {\small \sim} {\Large\downarrow} {\small g^{-1}} & \\
& X & \\
& {\small \sim} {\Large\downarrow} {\small \sigma} & \\
& X \times Y & \\
\pi_X \swarrow && \searrow \pi_Y \\
X && Y \\
{\small \sim} {\Large\downarrow} {\small g} && {\small \sim} {\Large\downarrow} {\small h} \\
X && Y
\end{array}$$
where $\pi_Y \circ \sigma = f$ and $h \circ \pi_Y \circ \sigma \circ g^{-1} = \tilde f$.
In particular, a function $X \overset f \longrightarrow Y$ is identified with a morphism $X \overset \sigma \longrightarrow X \times Y$ where $\pi_X \circ \sigma = 1_X$ and $\pi_Y \circ \sigma = f$.

The problem is that when you transform the domain and the codomain together, the resulting graph might not be that of a function.
Just take $Y = X$ and $G : (x,y) \mapsto (y,x)$. Then, what you want is equivalent to "the inverse of every function is a function", which is demonstrably false.
And in the product jargon:
$$\begin{array}{c}
& X & \\
& {\small \sim} {\Large\downarrow} {\small \sigma} & \\
& X \times Y & \\
\pi_X \swarrow & {\small \sim} {\Large\downarrow} {\small G} & \searrow \pi_Y \\
X & X \times Y & Y \\
\pi_X \swarrow && \searrow \pi_Y \\
X && Y \\
\end{array}$$
Even if $\pi_X \circ \sigma = 1_X$ and $\pi_Y \circ \sigma = f$, it is not necessarily true that $\pi_X \circ G \circ \sigma$ is an isomorphism.
However, $\pi_Y \circ G \circ \sigma$ might be a function you want, since its domain is $X$ and its codomain is $Y$.
Here, if $G(x,y) = (G_X(x,y),G_Y(x,y))$, then the new function $\tilde f : X \to Y$ would send $x$ to $G_Y(x,f(x))$.

For example, if $G : (x,y) \mapsto (x+2y,2x+y)$, then $f(x) \mapsto \tilde f(x) := 2x+f(x)$.
However, what seems to be the inverse of this construction (applying $G^{-1}$ instead of $G$) doesn't actually get you back to what you started with.
