Hi,
In regards to the transmission really you wont know until it happens but I can safely say the repairs on tranny are not as bad as you may think. I can share with you my wife's 1994 lexus es300 had 189,000 miles on the tranny when it began to exhibit a slight hesitation that got worse each day until it just wouldnt shift to 2nd anymore. (2nd gear Clutch failure= rebuild). I rebuilt it myself for less than $500.00 as I am mechanically inclined and had more time than money LOL!!!
What I suggest is if you like to the car, go ahead and have the mech do a filter change on it and inspect the interior of the tranny. Then test drive it taking it on a long trip. If you satisfied with the car then buy it. As with any uesd vehicle anything could break at anytime but I doubt it would be during the inspection period. Depending on mileage as a rule of thumb if it was over 150,000 for a 97 I would not buy it. If it was less than 100,000 I would depending on its price.
My tow cents worth........
(tow.... get it LOL)