Here is an alternate way of structuring the defining of your function:
j[x_, n_, l_] := 3 /; l < n
j[x_, l_, l_] := 5
j[x_, n_, l_] := j[x, n - 1, l]
Here is an alternate way of structuring the defining of your function:
j[x_, n_, l_] := 3 /; l < n
j[x_, l_, l_] := 5
j[x_, n_, l_] := j[x, n - 1, l]