A woman went for a 48km drive in her car, partly in town in the country. She drove at an average of 40km/hr in town and an average speed of 50km/hr in the country. If the drive took her one hour altogether then how long did she drive in the country?

since distance = speed * time,

50x + 40(1-x) = 48