given initial condition: $x_0$ and final condition $x_t$ the solution for the ODE $y'(x) = k\cdot y(x) + a$ is $y(x) = (y_0+\frac{a}{k})\cdot e^{kt} - \frac{a}{k}$.
When trying to find $k$ I get the equation: $(y_0+\frac{a}{k})\cdot e^{kt} - \frac{a}{k} = y_t$. When multiplying by $k$ we get: $(y_0\cdot k+ a)\cdot e^{kt} - a = y_t\cdot k$. While searching I found the Lambert's $W(x)$ function. But I didn't manage in manipulating the equation enough to use $W(x)$ function.
Lambert's function in wikipedia https://en.wikipedia.org/wiki/Lambert_W_function
ME post about $W(x)$ computation:Lambert- W -Function calculation?