a Middle English merger of Old English in (prep.) "in, into, upon, on, at, among; about, during;" and Old English inne (adv.) "within, inside," from Proto-Germanic *in (source also of Old Frisian, Dutch, German, Gothic in, Old Norse i), from PIE root *en "in." The simpler form took on both senses in Middle English.
Sense distinction between in and on is from later Middle English, and nuances in use of in and at still distinguish British and American English (in school/at school). Sometimes in Middle English shortened to i.
The noun sense of "influence, access (to power or authorities)," as in have an in with, is first recorded 1929 in American English. to be in for it "certain to meet with something unpleasant" is from 1690s. To be in with "on friendly terms with" is from 1670s. Ins and outs "intricacies, complications of an action or course" is from 1660s. In-and-out (n.) "copulation" is attested from 1610s.
work v.
a fusion of Old English wyrcan (past tense worhte, past participle geworht) "prepare, perform, do, make, construct, produce; strive after" (from Proto-Germanic *wurkjanan); and Old English wircan (Mercian) "to operate, function, set in motion," a secondary verb formed relatively late from Proto-Germanic noun *werkan (see work (n.)).
Sense of "perform physical labor" was in Old English, as was sense "ply one's trade" and "exert creative power, be a creator." Transitive sense "manipulate (physical substances) into a desired state or form" was in Old English. Meaning "have the expected or desired effect" is from late 14c. In Middle English also "perform sexually" (mid-13c.). Related: Worked (15c.); wrought; working.
To work in "insert, introduce or intermix, as one material with another," is by 1670s; hence the figurative sense "cause to enter or penetrate by repeated efforts." To work up (transitive) "bring into some state or condition" is by 1590s of material things, 1690s of immaterial things; hence "bring by labor or special effort to a higher state or condition" (1660s). The meaning "excite, stir up, raise, rouse" is from c. 1600. To work over "beat up, thrash" is from 1927. To work against "attempt to subvert" is from late 14c.
To work out "bring about or procure (a result) by continued labor or effort" is by 1530s. As "bring to a fuller or finished state, elaborate, develop," by 1821. Meaning "to solve, calculate the solution to" a problem or question is by 1848. Intransitive sense "make its way out" is from c. 1600; the sense of "succeed" is attested by 1909. Sense of "exhaust (a mine, etc.) by working it" is from 1540s. The pugilistic sense of "box for practice" (rather than in a contest) is by 1927, hence the general sense of "practice, rehearse" (1929) and that of "take exercise" (by 1948).