Find value in column B based on index range in column A

Job ID: 35274253

Budget: $10 – $15 USD

We need to find y value...

x = value
y = higher and closer value to x in col B.
Conditions:
y should be higher than max value in col A in index range
index range = y index - 1:last index
ex: if we found y in col B and it's index is 30, y should be higher than any value in column A in index range [31:1]
Related categories: Python Data Processing NumPy Pandas