Here's a Python function that implements the described algorithm:

```python
def find_element_position(a, x):
    while len(x) > 2:
        mid = len(x) // 2
        if x[mid] == a:
            return mid
        elif x[mid] < a:
            x = x[mid:]
        else:
            x = x[:mid]
    if len(x) == 2:
        if x[0] == a:
            return 0
        elif x[1] == a:
            return 1
    return -1

# Example usage:
a = 5
x = [1, 3, 5, 7, 9]
print(find_element_position(a, x))  # Output: 2
```

This function takes two arguments: `a` (the number to search for) and `x` (the sorted list). It uses a while loop to repeatedly update the sublist based on the middle element until the element is found or the sublist has a length of 2. If the element is found, the function returns the index; otherwise, it returns -1.