It is better to write a separate function to do the job. Here's my function. You can just copy it if you want
def pointInRect(point,rect):
x1, y1, w, h = rect
x2, y2 = x1+w, y1+h
x, y = point
if (x1 < x and x < x2):
if (y1 < y and y < y2):
return True
return False