We can do a recursive function as follows:
struct node * find(struct node *root,int val1, int val2)
{
if(!root) return NULL;
if(root->val > val1 && root -> val > val2)
{
return find(root->left, val1, val2);
}
if(root->val < val1 && root -> val < val2)
{
return find(root->right, val1, val2);
}
return root;
}