Let,
the no. of adults be "x"
then, the no. of childern = total people - total adults
= (30 - x)
Now,
According to the quesiton,
2 (30 - x) + 5x = 87
60 - 2x + 5x = 87
60 + 3x = 87
3x = 87 - 60
3x = 27
x = 27 / 3
x = 9
So, there were 9 adults in the group