Set the number of friend is x, the number of marbles is y.

everyone 11 marbles, left 6 marbles

So 11x + 6 = y (1)

everyone 14 marbles, red 12 marbles

So 14x - 12 = y (2)

according to (1), (2)

11x + 6 = y => x = 6

14x - 12 = y y = 72

So there are 6 friends, 72 marbles.