pts = {{0, 0}, {0, -500}, {4, 0}};
imPts = {{98, 188}, {98, 141}, {173, 188}};
transform[{a_, b_, c_}, {aref_, bref_, cref_}] :=
Composition[
ScalingTransform[{First[c - a]/First[cref - aref],
Last[(a - b)]/Last[(aref - bref)]}],
TranslationTransform[a - aref]
]