Cannot find reason for wrong answers

the code for challenge (intersection point two linked list), i got 3 wrong answers out of 4 on submission. i can not find out whats wrong with function. also how can we our self create test case for such questions ?