Ok so how would I solve for $j$: $(e*j)\bmod z=1$ When $e$ and $z$ are known integers. I am at a loss with this without using trial and improvement. Is there a formula I could use?
You are asking for a modular inverse $j$ of $e$ modulo $z$. It only exists if $\gcd(e,z)=1$, in which case it is a unique class modulo $z$. You can find that class using Bézout coefficients: there exist $s,t\in\Bbb Z$ such that $se+tz=\gcd(e,z)$, and if the latter is $1$ then $j=s$ is a solution of the problem.