Yes you can do it but the time z will depend on x and y.

It's like those physics questions about velocity. To see that - suppose you have a bike with a (small) wheel that turns round once every meter and clicks once on each turn.

Then, start with the bicycle travelling at say 60 bpm (velocity one meter per second but let's use meters per minute so that units are same as for tempo),

Then, it accelarates at constant speed to say 120 bpm over some time period (doesn't matter what).

It will travel at 60 m per minute, accelerating to 120 bpm and just as for velocity questions, you can then say that it would go the same distance (so same number of ticks of the wheel) if it travelled at the average speed, here 90 bpm.

So - in this case, its going to average 90 bpm, no matter how large or small z is. So to get it to work, z has to be an integral multiple of 60/90. So e.g. z = one minute would do fine. Also z = one minute and 2/3 seconds. Any multiple of 2/3 seconds in this particular case will work okay. Any other value of z won't - unless you change the requirements so that it goes at non constant acceleration.

BTW you can play rhythms like this with my Bounce Metronome Pro - lets you set the start and finish tempo and it will do a gradual tempo change from one to the other.