A simplier solution is offered by the illustration below.
Given the position of the cue ball and the object ball, you will need to get the midway point of both balls. In the illustration, it is designated as point "M". The next thing to do is draw a line from the object ball accross the opposite cushion parallel to the short rail, in the illustration, this is designated as line "F". At the end of that line would be your point "Z" in the illustration.
Figure 1
Next, from point "M", draw an imaginary line towards point "Z". This line (designated as line "N") will be your guiding line to determine point "X" on the cushion. All that is left to do is draw an imaginary line from the cue ball to the cushion that is parallel to the imaginary line "N". In the illustration above, this is designated by the blue line "P".