How were formulas / images added to books in post-printing-press / pre-digital times?
Euclid's Elements of Geometry (1482)
In the 1455 Gutenberg bible the illustrations were hand-drawn after printing.The illustrations in the 1482 Elements were printed. [In some copies the diagrams were colored in by hand, see right image above.]
In a foreword the printer Erhard Ratdolt attributed the prior lack of printed mathematical works to the difficulty produced by the diagrams, and adds "Having perceived, that it was this alone that formed an obstacle to something that would be useful to all, I have achieved, by applying myself to the problem and not without putting in much hard work, that geometrical figures can be composed with the same ease as movable type".
There appears to be some uncertainty on the nature of Ratdolt's method, which he did not explain any further. The common practice in the 15th century was to use woodcuts for illustrations, as discussed by Bowers. Alternatively, according to this source, Ratdolt had devised elementary geometrical forms in type metal which could be combined to form figures which, being in metal, could be printed at the same time as the typeset page.
The OP asks also for early printed formulas. The earliest appearance of + and - symbols appears to be Johannes Widmann (1489), see image below. Notation that would need subscript or superscripts (such as exponents) was generally avoided, as were fractions with a bar. A quote: The bar is generally found in Latin manuscripts of the late Middle Ages, but when printing was introduced it was frequently omitted, doubtless owing to typographical difficulties. This inference is confirmed by such books as Rudolff's Kunstliche rechnung (1526), where the bar is omitted in all ordinary fractions but is inserted in fractions printed in larger type and those having large numbers.
Printing requires pressing the mould against a hard surface with only a paper in between. This damages wood carvings, so they have a limited number of prints. In modern times, Escher, for example, used a Japanese technique that involved pressing the prints with bones. This was nicer to the engraving, but very time consuming and not so suitable for line production.
In later times, the chemistry allowed engraving metal, the etching. A sheet of copper is covered in a varnish, and the drawings are done removing selectively this layer. When finished, the sheet is submerged in acid, that corrodes the exposed metal, but leaves the areas protected by varnish.
As adding any non text to printed books was so difficult, mathematical notation developed slowly. For example, the equal sign was not invented until 1557. Before that, they just spelled it out (or used Latin abbreviations). More advanced symbols, requiring reordering the elements of the text (the equal sign is just one character more in text), may have been invented before, but it would take a lot of effort to communicate to the rest of mathematicians.
The following references describe mathematical printing in the 1950s, before it became too expensive and degenerated into illegible typescript:
The Printing of Mathematics by T. W. Chaundy, P. R. Barrett and Charles Batey, Oxford University Press, 1954.
Setting Mathematics by Arthur Phillips, in The Monotype Recorder 40 (4), Winter 1956.
Printing Mathematics by Peter Basnett, in Eureka 23 (1960) 11-13.
At that time, ordinary text (novels and newspapers) was set using the Linotype system, in which the compositor would use a huge keyboard to select characters and then they would be set in molten lead a whole line at a time.
However, this was unsuitable for mathematics and the "state of the art" was the Monotype Four Line System, which had movable type. The following piece of nonsense is a block provided by Monotype and used in the Eureka article:
Each letter is set on a block (shown in grey) that occupies space on one of the four lines. However, the $g$, $X$, $b$ and $Y$ overhang their blocks and are supported by spacer blocks (white) in the other line.
You could add big integral or summation signs in front of such a fractional expression, and (I think) a $d x$ vertically centered after it.
Here is the Eureka article but I will happily delete it if the author or current editor objects.