This may be helpful.
Summary:
With the pre-order traversal [x1,…,xn] and the in-order traversal [z1,…,zn], you can rebuild the tree as follows:
The root is the head of the pre-order traversal x_1. Let k be the index such that z_k=x1. Then [z_1,…,z_k−1] is the in-order traversal of the left child and [z_k+1,…,z_n] is the in-order traversal of the right child. Going by the number of elements, [x_2,…,x_k] is the pre-order traversal of the left child and [x_k+1,…,x_n] that of the right child. Recurse to build the left and right subtrees.