(y-x)/z=x/a
zx=a(y-x)
zx+ax=ay
(a+z)x=ay
x=ay/(a+z)

手を動かせ