#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const long long INF = 1e18;
const int N = 4e5 + 1000;
struct node {
  int v, c, w;
};
struct segtree {
  int l, r, a, b;
  long long w, c;
} f[N * 2];
int n, m, tim, t;
vector<node> g[N];
int dep[N], p[N][20], l[N], r[N], pre[N], d[N];
long long val[N], dis[N], a[N], c[N];
void push_down(int p) {
  if (f[p].c == 0) return;
  f[f[p].l].w += f[p].c;
  f[f[p].r].w += f[p].c;
  f[f[p].l].c += f[p].c;
  f[f[p].r].c += f[p].c;
  f[p].c = 0;
  return;
}
void build(int p, int a, int b) {
  f[p].a = a;
  f[p].b = b;
  f[p].c = 0;
  if (a + 1 == b) {
    f[p].w = dis[d[a]] + c[d[a]];
    return;
  }
  int m = (a + b) / 2;
  t++;
  f[p].l = t;
  build(t, a, m);
  t++;
  f[p].r = t;
  build(t, m, b);
  f[p].w = min(f[f[p].l].w, f[f[p].r].w);
  return;
}
void Insert(int p, int x, int y, int z) {
  if (x <= f[p].a && y >= f[p].b - 1) {
    f[p].w += z;
    f[p].c += z;
    return;
  }
  push_down(p);
  int m = (f[p].a + f[p].b) / 2;
  if (x < m) Insert(f[p].l, x, y, z);
  if (y >= m) Insert(f[p].r, x, y, z);
  f[p].w = min(f[f[p].l].w, f[f[p].r].w);
  return;
}
long long Query(int p, int x, int y) {
  long long ans = INF;
  if (x <= f[p].a && y >= f[p].b - 1) {
    return f[p].w;
  }
  push_down(p);
  int m = (f[p].a + f[p].b) / 2;
  if (x < m) ans = min(ans, Query(f[p].l, x, y));
  if (y >= m) ans = min(ans, Query(f[p].r, x, y));
  return ans;
}
void dfs(int u, int value, int deep, int fa) {
  l[u] = ++tim;
  dis[u] = value;
  dep[u] = deep;
  p[u][0] = fa;
  d[tim] = u;
  for (int i = 1; i < 20; i++) p[u][i] = p[p[u][i - 1]][i - 1];
  for (int i = 0; i < g[u].size(); i++) {
    pre[g[u][i].c] = g[u][i].v;
    val[g[u][i].v] = g[u][i].w;
    dfs(g[u][i].v, value + g[u][i].w, deep + 1, u);
  }
  r[u] = tim;
  return;
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (int i = 19; i > -1; i--)
    if (dep[p[x][i]] >= dep[y]) x = p[x][i];
  if (x == y) return x;
  for (int i = 19; i > -1; i--)
    if (p[x][i] != p[y][i]) {
      x = p[x][i];
      y = p[y][i];
    }
  return p[x][0];
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    long long z;
    scanf("%d%d%I64d", &x, &y, &z);
    node e;
    e.v = y;
    e.c = i;
    e.w = z;
    g[x].push_back(e);
  }
  for (int i = 1; i < n; i++) {
    int x, y;
    long long z;
    scanf("%d%d%I64d", &x, &y, &z);
    c[x] = z;
    a[i] = x;
  }
  tim = 0;
  c[1] = 0;
  dfs(1, 0, 1, 0);
  t = 1;
  build(1, 1, n + 1);
  while (m--) {
    int op, x;
    long long y;
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d%I64d", &x, &y);
      if (x < n) {
        x = pre[x];
        Insert(1, l[x], r[x], y - val[x]);
        val[x] = y;
      } else {
        x = a[x - n + 1];
        Insert(1, l[x], l[x], y - c[x]);
        c[x] = y;
      }
    } else {
      scanf("%d%I64d", &x, &y);
      int k = lca(x, y);
      long long ans;
      if (k == x) {
        ans = Query(1, l[y], l[y]) - Query(1, l[x], l[x]) + c[x] - c[y];
      } else {
        ans = Query(1, l[x], r[x]);
        long long dx = Query(1, l[x], l[x]) - c[x];
        long long dy = Query(1, l[y], l[y]) - c[y];
        ans = ans - dx + dy;
      }
      printf("%I64d\n", ans);
    }
  }
  return 0;
}
