It is intuitive that one can simply doing a cut-gluing surgery to make a $6^3_2$ to a $3_1$ trefoil knot:
e.g. from

to

All one needs to do it to cut the three intersections at the angle of $\pi/6$, $\pi/6+2\pi/3$, $\pi/6+4\pi/3$ and then gluing three intersections.
question: So what is the precise mathematical formulation of this procedure? And how to write a math formula to implement this procedure?
i.e. What I was hoping to know is something like $$ 3_1= \text{function[cut and glue]}\circ [6^3_2] $$
You are probably looking for skein relation that features prominently in the definitions of Conway, Jones, and HOMFLY polynomials. Notice that skein relation includes not 2 but 3 links: knot invariants are usually defined as relations between all 3 knots/links, not just 2 of them.