In Triangle ABD using Pythagoras theorem we can write
[tex] AB^2=AD^2+BD^2\\
\\
AB^2=9^2+BD^2\\
\\
AB^2=81+BD^2\\ [/tex]
Now In Triangle BCD Using Pythagoras theorem we get
[tex] BC^2=BD^2+CD^2\\
\\
z^2=7^2+BD^2\\
\\
z^2=49+BD^2\\ [/tex]
Now in larger Triangle ABC using Pythagoras theorem we can write
[tex] AB^2+BC^2=AC^2\\ [/tex]
Now substitute the values from above two equations we get
[tex] AB^2+z^2=(9+7)^2\\
\\
81+BD^2+z^2=16^2\\
\\
BD^2=z^2-49\\
\\
81+z^2-49+z^2=256\\
\\
2z^2=224\\
\\
z^2=112\\
\\
z=4\sqrt{7} [/tex]