If a person is wealthy and doesn't need to spend that amount during the entire duration of Z, since they have other wealth to spend, they would likely choose Z for the higher return over the same time period.
So only a relative poverty would encourage the person to choose A.
Assuming they have unlimited life span. If not and their lifespan is uncertain, then the value of Z is reduced by the chance of not surviving long enough to profit from it.
If they can invest A and get a higher return than waiting for Z, then A is a more profitable choice.
Learning Arduino might be a good starting point, since they are easy and popular. You'll probably need to learn C, since Arduinos (or the controllers on the Arduino boards) are programmed in C or assembly.
There is a cost for equipment and parts when working with hardware.
Creating effects in the physical world with your code feels awesome. Learning and building physical tech is just awesome all around.
So only a relative poverty would encourage the person to choose A.
Assuming they have unlimited life span. If not and their lifespan is uncertain, then the value of Z is reduced by the chance of not surviving long enough to profit from it.
If they can invest A and get a higher return than waiting for Z, then A is a more profitable choice.