In applying matrix-analytic methods to M/G/1-type and tree-like QBD Markov chains, it is crucial to determine the solution to a (set of) nonlinear matrix equation(s). This is usually done via iterative methods. We consider the highly structured subclass of triangular M/G/1-type and tree-like QBD Markov chains that allows for an efficient direct solution of the matrix equation