Exploits the knowledge that w and h are non-negative.
All it took was a question on the LÖVE Discord, which pointed me at the technical term of AABB (axis-aligned bounding box) collision detection.
GB2CWTJMXKFOZ6GWSFL3KA7OI7FIDCOGT7Z2I4IGGWRRR3OERIZQC
return overlapping_intervals(a.x, a.x+a.w, b.x-20, b.x+b.w+20)
and overlapping_intervals(a.y, a.y+a.h, b.y-20, b.y+b.h+60) -- leave more space below existing definitions
return a.x < b.x + b.w+20 and a.x + a.w > b.x-20
and a.y < b.y + b.h+60 and a.y + a.h > b.y-20