Arimax models : Differencing the xreg I am solving some time series problem. For this, I am using auto.arima function from forecast package in R. I noticed in many threads that auto.arima does the difference for xreg given y(the dependent time series), while auto.arima estimates the parameters. So that makes my life easier. I do not have to worry about the stationarity of y, auto.arima will handele it automatically.
https://stackoverflow.com/questions/38505159/auto-arima-not-differencing-while-it-should
My purpose is to understand how actually the forecast takes place in case of arimax models, so that I can explain the forecast to clients.
To explore the forecasting part, I went through the forecast function, and then to stats:::predict.Arima function. In both of these functions, xreg is not differnced. I want to understand why is this?
If while building models in auot.arima, we are differencing xreg for parameter estimation, why we are not differencing xreg, while predicting/forecasting.
I hope the question makes sense. 
 A: You asked ."My purpose is to understand how actually the forecast takes place in case of arimax models, so that I can explain the forecast to clients."
At the end of the day a useful model may look like  which can be restated as follows  ( possible lags in Y and the error process not shown for simplicity) and also this easily generalizes to multiple inputs both known and imputed via Intervention Detection
What I recognized a long time ago was the need to sell/explain the equation in a PDL/ADL manner in order for the client to fully understand the model/prediction thus I implemented ( and you can also ) an algebraic re-statement in AUTOBOX ( a forecasting package that I have helped to develop ).
The model that was automatically generated for the Leading Indicator example form Box and Jenkins is here

MODELS ARE PRESENTED:
1.PURE MODEL IN TERMS OF THE INPUTS
  Y=K1+[W(B)/D(B)]*X+[THETA(B)/PHI(B)]*A
2.AS A MIXED MODEL INCLUDING LAGS OF Y
  D(B)*PHI(B)*Y= K2
                =+PHI(B)*W(B)*X
                =+D(B)*THETA(B)*A
                 =+PHI(B)*W(B)*X
                 =+D(B)*THETA(B)*A
    WHERE K2 = K1*[D(B)*PHI(B)]                                             
     OR   K1 = K2*/[D(B)*PHI(B)]                                            

ESTIMATION IS ACTUALLY DONE AS A (2)
WHILE THE TABLE PRESENTS IT AS A (1).
IN THE TABLE THE CONSTANT IS K2 WHILE
PRESENTED IN FORM (1) THE CONSTANT IS K1
WE PRESENT IT HERE IN FORM (2).                                                 
MODEL EXPRESSED AS AN XARMAX
Y[t] =   a1Y[t-1] + ... + a[p]Y[t-p]
       + w[0]X[t-0] + ... + w[r]X[t-r]
       + b1a[t-1] + ... + b[q]a[t-q]
       + constant                                                               
So I delivered a report that was named RHSIDE.TXT.
For example using the leading indicator example of Box and Jenkins (sale data)
this is the report that you are (correctly) looking for 

Another classic example the Gasx-Gasy data set from the same source yielded ...based upon a more complicated model . 
I have found that this approach has been very successful in "easing the pain" of the customer.
Additionally if future X's have to be predicted you need to address how their forecasts are generated .
EDITED TO RESPOND SPECIFICALLY TO THE QUESTION ABOUT DIFFERENCING:
IF the ARIMA model contains a differencing operator this implicitely acts a differencing operator on any user suggest causals e.g.
     y(t)=w0*x(t) + a(t)/[1-B] 

yields   y(t)=y(t-1) + w0*x(t) -wo*x(t-1) +a(t)
 or  y(t)=y(t-1) +[1-B]x(t) + a(t)  

so in effect the x enters in terms of differences
A: Rob Hyndman (developer of the forecast package in R) explains in his blogpost the difference between his R implementation of ARIMAX and the transfer function approach to ARIMAX.  The R forecast package is a regression of the X variables and an ARMA model applied to the regression errors, not a transfer function approach as you've described.
The ARIMAX Model Muddle
