During inspiration, the intercostal muscles contract, which causes the rib cage to move up and outwards. At the same time, the diaphragm also contracts, which increases the volume of the thoracic cavity. This expansion of the thoracic cavity creates a lower pressure inside the lungs, allowing air to be drawn in. Therefore, the correct answer is that the intercostal muscles contract pulling the rib cage up and out, while the diaphragm contracts increasing thoracic volume.