We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).

Strict Trs:
  { g(x, h(y, z)) -> h(g(x, y), z)
  , g(f(x, y), z) -> f(x, g(y, z))
  , g(h(x, y), z) -> g(x, f(y, z)) }
Obligation:
  runtime complexity
Answer:
  YES(?,O(n^1))

The input is overlay and right-linear. Switching to innermost
rewriting.

We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).

Strict Trs:
  { g(x, h(y, z)) -> h(g(x, y), z)
  , g(f(x, y), z) -> f(x, g(y, z))
  , g(h(x, y), z) -> g(x, f(y, z)) }
Obligation:
  innermost runtime complexity
Answer:
  YES(?,O(n^1))

The problem is match-bounded by 1. The enriched problem is
compatible with the following automaton.
{ g_0(2, 2) -> 1
, g_1(2, 2) -> 3
, g_1(2, 4) -> 1
, g_1(2, 4) -> 3
, f_0(2, 2) -> 2
, f_1(2, 2) -> 4
, f_1(2, 3) -> 1
, f_1(2, 3) -> 3
, f_1(2, 4) -> 4
, h_0(2, 2) -> 2
, h_1(3, 2) -> 1
, h_1(3, 2) -> 3 }

Hurray, we answered YES(?,O(n^1))