Doubt in Intersection point of linked list

Why is my code giving TLE? Pleas help.
Code: https://ide.codingblocks.com/s/573568

Update this

Node *intersectionOfTwoLinkedLists(Node *l1, Node *l2)
{
    int len1 = length(l1);
    int len2 = length(l2);
    int d;

    if(len1 > len2){
        d = len1 - len2;
        while(d--)
            l1 = l1->next;
    }else{
        d = len2 - len1;
        while(d--)
            l2 = l2->next;
    }
    while(l1 != nullptr and l2 != nullptr){
        if(l1->data == l2->data)
            return l1;
        l1 = l1->next;
        l2 = l2->next;
    }
    return nullptr;
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.