The could well be Biff, Chip and Kipper: The Flying Machine and Other Stories, which is part of The Oxford Reading Tree (is that where you got "The O" from?). I have not read any of those books myself, but according to the site, it's a series of books designed to help children advance their reading skills. From the description, it fits what you mention reasonably well. The description mentions the Middle Ages and ancient Egypt, and the kids help invent a flying machine. The book is intended for ages 6-8, and since you mention attending primary school when you read it, I believe this may be the book you're looking for.
Put on a play in the Middle Ages, find out what happens to Floppy in Ancient Egypt and join Nadim and Anneena as they help invent a flying machine!
This collection contains four Read with Oxford Stage 5 stories that are ideal for children who are beginning to read independently. There are tips for parents and fun activities throughout the book for you and your child to enjoy together.