Installing Moodle in NextCloud

Hello All,

Please do not mind if my question appears complete gibberish. I am a Mathematics teacher got into this really recently.

I have Moodle installed in my shared hosting website. I need two software for Moodle, they are Maxima and Sagemath (Opensource Mathematics Computation Algebra Systems). Shared hosting does not allow their installation. I have been told that it could be achieved using NextCloud. The two possibilities are: (1): Install these software on my laptop (inside or outside NextCloud Server) and then connect them with Moodle in cPannel using NextCloud. (2): Install Moodle and the software in the NextCloud server on laptop and connect Moodle with cPannel to run on www (dedicating that laptop as local server in both cases). Clearly I do not want to pay for VPS for this reason.

My questions are: Is any of these two actually possible? Can we make Moodle communicate with those two software like this? Also will I be able to install other Moodle Plugins, if I install Moodle locally?

Please try to answer with minimal technical terminology.

Many thanks in advance.