The first observation in this problem is that we can compress the graph into a graph of $$$O(k)$$$ nodes with weighted edges, the nodes are the nodes from which there is an outgoing ski lift, which we will denote by special nodes, and the edges are the maximum number of seconds you can spend going from $$$a$$$ to $$$b$$$ by using exactly $$$1$$$ ski lift. To calculate the weight of the edges, one can store, for each node, an array $$$dist$$$, where $$$dist_{i, j}$$$ denotes the distance from node $$$i$$$ to the $$$j$$$-th special node.
To compute this array, as the graph is acyclic, you can start a BFS from the nodes wich have no outgoing edges. If you currently are in node $$$u$$$, you compute $$$dist_u$$$ in the following way: if $$$u$$$ is the special node number $$$i$$$, then $$$dist_{u, i} = 0$$$, if it is not a special node, we don't do this step. Then, for each outgoing edge from $$$u$$$ to $$$v$$$, for each $$$i$$$, $$$dist_{u, i} = \max(dist_{u, i}, 1 + dist_{v, i})$$$.
After computing $$$dist_u$$$, for all edges from some $$$v$$$ to $$$u$$$, you substract $$$1$$$ from the outdegree of $$$v$$$, if the outdegree of $$$v$$$ becomes $$$0$$$, you add it to the queue.
This algorithm ensures that the distance is always maximal, as you are considering all the possibilities and taking the maximum out of all of them, due to the order in which it is done.
Similar algorithms could work, for example using the topological order of the graph or doing a bottom-up DP. The important aspect is that all the children of a node are processed before it.
For the representation of the compressed graph, we will use a matrix $$$A$$$, $$$A_{i, j}$$$ denoting the maximum distance from the $$$i$$$-th special node to the $$$j$$$-th special node, while using one of the outgoing ski lifts from the $$$i$$$-th special node.
Once we have calculated $$$dist_{i, j}$$$, we can calculate the matrix $$$A$$$ by iterating over the ski lifts. Let the current ski lift go from $$$a$$$ to $$$b$$$, then for all special nodes $$$c$$$ reachable from $$$b$$$, $$$A_{a,c} = \max(A_{a,c}, 1 + dist_{b, c})$$$.
Now that we have calculated this matrix, it is easy to observe that we can easily get the distance from any special node to any other special node using $$$k$$$ lifts by "merging" $$$A$$$ with itself $$$k-1$$$ times. We use "merging" instead of exponentiating $$$A$$$ to $$$k$$$, because the operation is not exactly the same as matrix multiplication, although the algorithm for computing it and the complexity are the same. Instead, if we "merge" two matrices $$$A$$$ and $$$B$$$ of size $$$k \times k$$$, in this problem we need the resulting matrix $$$C$$$ to be defined in the following way:
$$$ C_{i, j} = \max\limits_{1 \le q \le k} A_{i,q} + B_{q,j} $$$Even if is not exactly matrix multiplication, we will denote $$$A$$$ merged with itself $$$k-1$$$ times as $$$A^k$$$, for simplicity. So, we can calculate $$$A^(2^p)$$$, for each $$$p$$$ from 0 to $$$\log_2 x$$$, in $$$O(k^3 \cdot \log x)$$$. With this matrices, we will do a greedy algorithm to determine the minimum number of ski lifts necessary. Note that we consider separately whether it is possible to spend $$$x$$$ minutes using $$$0$$$ or $$$1$$$ ski lifts, but we won't discuss it as it is very easy.
We will iterate over the powers of $$$2$$$ of the matrix that we previously calculated, going from $$$p = \log_2 x$$$ to $$$p = 0$$$, while we keep a current matrix, the current ski lifts we have taken and the answer. Then, for each $$$p$$$, if merging our current matrix with $$$A^(2^p)$$$ results in another matrix $$$B$$$ such that the maximum element of $$$B$$$ (plus taking into consideration the initial path to the ski lift and the final path from the ski lift, which is just small casework) is at least $$$x$$$, then we set the answer to be $$$2^p + \text{the current ski lifts we have taken}$$$. Otherwise, we sum $$$2^p$$$ to the current ski lifts we have taken and set the current matrix to matrix $$$B$$$.
Final complexity: $$$O(k^3 \log x)$$$.