The main purpose of this paper is to study and investigate certain results concerning the $(\sigma,\tau)$-generalized derivation $D$ associated with the $(\sigma,\tau)$-derivation $d$ of semiprime and prime rings $\mathbb{R}$, where $\sigma$ and $\tau$ act as two automorphism mappings of $\mathbb{R}$. We focus on the composition of $(\sigma,\tau)$-generalized derivations of the Leibniz's formula, where we introduce the general formula to compute the composition of the $(\sigma,\tau)$-generalized derivation $D$ of $\mathbb{R}$.