Concept:
Since \(AD \parallel BC\) and \(AB\) is perpendicular to both of them, the quadrilateral is a right trapezium.
Given:
\[
AB=40,\qquad BC=250,\qquad CD=50
\]
To find the perimeter, we first determine the length of \(AD\).
Step 1: Find the horizontal difference between the two bases.
Draw a perpendicular from \(D\) to \(BC\) meeting it at \(E\).
Since \(AD \parallel BC\),
\[
DE=AB=40
\]
In right triangle \(DEC\),
\[
DC=50,\qquad DE=40
\]
Applying Pythagoras theorem,
\[
EC=\sqrt{DC^2-DE^2}
\]
\[
EC=\sqrt{50^2-40^2}
\]
\[
EC=\sqrt{2500-1600}
\]
\[
EC=\sqrt{900}
\]
\[
EC=30
\]
Step 2: Find the length of \(AD\).
The lower base exceeds the upper base by \(EC\).
Hence,
\[
AD=BC-EC
\]
\[
AD=250-30
\]
\[
AD=220
\]
Step 3: Calculate the perimeter.
\[
\text{Perimeter}
=AB+BC+CD+AD
\]
\[
=40+250+50+220
\]
\[
=560
\]
Thus the perimeter of the quadrilateral is
\[
\boxed{560}
\]