The systematic approach should be like this below. We know that
- Post-order Traversal: $\mathrm{leftChild/SubTree}\rightarrow \mathrm{rightChild/SubTree}\rightarrow\mathrm{parent}$
- In-order Traversal: $\mathrm{leftChild/SubTree}\rightarrow\mathrm{parent}\rightarrow\mathrm{rightChild/SubTree}$
That's why we will remove at least the three nodes from the left side from both sequences in such a way that removed nodes satisfy the conditions above. It will discover the sub-tree containing the parent node as its root. Then put the parent node of that sub-tree to the sequence from the left. Repeating this process will yield the required binary tree.
$\left.\begin{matrix} (8, 9, 6), 7, 4, 5, 2, 3, 1\\ (8,6,9),4,7,2,5,1,3 \end{matrix}\right\}\Rightarrow 8-6-9 \Rightarrow 6$ is the parent node.
$\left.\begin{matrix} (6, 7, 4), 5, 2, 3, 1\\ (6,4,7),2,5,1,3 \end{matrix}\right\}\Rightarrow 6-4-7 \Rightarrow 4$ is the parent node.
$\left.\begin{matrix} (4, 5, 2), 3, 1\\ (4,2,5),1,3 \end{matrix}\right\}\Rightarrow 4-2-5 \Rightarrow 2$ is the parent node.
$\left.\begin{matrix} (2, 3, 1)\\ (2,1,3) \end{matrix}\right\}\Rightarrow 2-1-3 \Rightarrow 1$ is the parent node.
Combining the sub-trees yield the required binary tree below.
So, the height of the tree is the length of the path of $~(1,2),(2,4),(4,6),(6,8)~$. Thus it is $4$.