leaning ladders- a nasty quartic

Two ladders leaning in opposite directionsbetween two walls.Each ladder touching the base of the opposite wall Ladders are 40 ft and 60 ft respt. cross at hy of 10 ft , h, what is the distance tween walls w ?