break up the regular octagon into eight isosceles triangles with common vertex at the center ...
the vertex angle = 360/8 = 45 degrees
the base angles of each triangle are each (180-45)/2 = 67.5 degrees
the base of each isosceles triangle is 10 inches.
the apothem is the height of the isosceles triangle, from the vertex angle perpedicular to the base ... sketch it in, you now have a right triangle.
using your trig ratios ...
tan(67.5) = h/5 or h = 5tan(67.5), the length of the apothem.