There are a few options to achieve this.
The first option is to use the test setting "file upload". You can find this option in the teacher environment, when you're scheduling a test. You can allow students to upload a file once per test, or per test question. This can be a PDF, an Excel-file or indeed a photo of their calculations.
The second option is to use the test setting "note". You can allow students to add a note to each question. This means that in addition to their regular input field, where they can input the final answer, they have an additional input field where they can mix text, formulas and even drawings.
Both uploaded files and notes will have to be checked and graded manually by the teacher.