$15x+72y+21z=9 (1)$
$15+72y = gcd(15,72).r1$
(1) can be written as :
15x+72y=gcd(15,72).r1 (2)
gcd(15,72).r1 + 21z = 9 (3)
$15x+72y=gcd(15,72).r1$
Calculating $GCD(15,72)$ gives:
$72 = 4*15 + 12$
$15 = 1*12 + 3$
$12 = 4*3 + 0$
from (2) and (3) $15x+72y=3.r1 (4)$
$3.r1 + 21z = 9$ (5)
Then applying the Extended Euclidean Algorithm:
$3 = (1 * 15) + (-1 * 12) = (-1 * 72) + (5 * 15)$
A particular solution is $x,y = (5,-1)$ multiply by r1 the $(5r1,-r1)$
general solution $(x,y)=(5r1+24m, -r1-5m)$
$3.r1 + 21z = 9 gcd (3,21) = 3 | 9$ so the is solution $(r1,z) = (3+7n, -n)$
$x=5r1+24m = 5(3+7n)+24m=15+35n+24m$
$y=-r1-5m=-3-7n-5m$
$z=-n$
$(x,y,z) = (15+35n+24m, -3-7n-5m, -n)$
I provide this exercise as an example for diophantine equations with 3 variables however please somebody check for mistakes