First element in preorder[] will be the root of the tree, here its 10.

Now the search element 10 in inorder[], say you find it at position i, once you find it, make note of elements which are left to i (this will construct the leftsubtree) and elements which are right to i ( this will construct the rightSubtree).

See this step above and recursively construct left subtree and link it root.left and recursively construct right subtree and link it root.right.

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.
__________________________________________________