Simple 'Def and If' in exam that i could not figure out. : this question came out in my Python exam and i could not answer it. 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    x = 7
    y = 3
    def a(x):
        return b(x)
    def b(y):
        if y == 6:
            return x - y
        return a(x-1)
    print(a(4))

<!-- end snippet -->

The answer is 1. 
But i'm not sure how it is derived.

Hope someone can give me a clear explanation. Thanks in advance. 