It seems to me that what many of your problems have in common is a given line $L$ and a given distance $d$ and you want a line $M$ parallel to $L$ and at distance $d$ from $L$, so let's solve this problem once and for all and then maybe you can solve all your problems.
Let the line $L$ be given by $y=mx+b$. Pick any point $P$ on this line, say, $P=(0,b)$. The line through $P$ perpendicular to $L$ has equation $y=-(1/m)x+b$ We want a point $Q$ on this line at distance $d$ from $(0,b)$, so we want $x^2+(y-b)^2=d^2$ So we have two (displayed) equations in the two unknowns $x,y$. The first equation says $y-b=-x/m$, and sticking that in the second equation we get $x^2+(x^2/m^2)=d^2$ which you can solve for $x$, getting $x=\pm dm/\sqrt{m^2+1}$. Then you can use the first displayed equation to get $y$. Note that there are two solutions, one on either side of the line $L$. In practice, you should have no difficulty telling which of the two possibilities for $Q$ is the one you want.
Now that you have the coordinates for $Q$, let's say $Q=(r,s)$, the equation of the line $M$ is simply $y=m(x-r)+s$.
Now you generally want vertices, not lines, but that's easily taken care of; once you have the equations of the lines that form your polygon, you find the vertices by solving pairs of equation of lines simultaneously.
You may have to be a little careful with the formulas if the lines involved are horizontal or vertical, but these are the easy cases where you don't really need to do all the work outlined above anyway.
As an exercise, try to carry out these steps with your triangle-in-a-triangle.