Here's a geometric construction for an ellipse tangent to lines $P_1P_2$, $P_3P_4$ at tangency points $P_2$, $P_3$. There is some freedom left in the construction, so you can fix another point on the ellipse, as explained below.
Let $T$ be the point where lines $P_1P_2$ and $P_3P_4$ meet. If $M$ is the midpoint of $P_2P_3$, ray $TM$ passes through the center of the ellipse and you can choose at will on it another point $P$ of the ellipse (provided $M$ lies between $T$ and $P$): every choice of $P$ will lead to a different ellipse satisfying your request. If you need, in particular, an ellipse of minimum eccentricity, you can choose $P$ as explained here.
To find other two points on the ellipse, take any point $H$ on $PP_2$ and draw through it a line parallel to $P_2P_3$, meeting line $P_1P_2$ at $A$ and line $P_3P_4$ at $B$. Construct then on segment $AB$ two points $N$ and $O$ such that $AN\cdot BN=AH^2$ and $BO=AN$ (a possible geometric construction is hinted in the diagram below). These two points also belong to the ellipse,
which is then fully specified as the conic section passing through $P_2P_3OPN$.
In case lines $P_1P_2$ and $P_3P_4$ are parallel, construct line $MT$ through $M$ and parallel to them, then go on as explained above.
You should have no problems in working out the coordinates of $P$, $N$ and $O$. Once you have the five points, you can find the ellipse equation by substituting their coordinates in the generic equation $x^2+ay^2+bxy+cx+dy+e=0$ to find the unknown coefficients $a$, $b$, $c$, $d$, $e$.