We are looking for a function $g()$:
$$Y = g(X),\;\; F_Y(g(x)) = F_2(y)$$
Inverting the second required relation we obtain
$$F_2^{-1}\left[F_Y(g(x))\right] = y,\;\; \forall y,x$$
By the probability integral transform theorem , the random variable $Z=F_Y(g(X))$ is a uniform random variable in $[0,1]$, whatever $F_Y()$ is (as long as it is a cdf), and whatever $g()$ is. But by the same theorem, the random variable
$W = F_1(X)$ is also $U(0,1)$. So we require, equivalently,
$$ Y = g(X) = F_2^{-1}\left(F_1(X)\right)$$
So $$g(\cdot) = F_2^{-1}\left(F_1(\cdot)\right)$$
and as a stepwise algorithm,
1) Take your data and use them as inputs in the function $F_1()$.
2) Take the new data obtained in step 1 and used them as inputs in the function $F_2^{-1}()$.
3) The result will be a set of data distributed according to $F_2$.