Verified Answer :

You need to put them in groups of 5 ( 4 alligators+1 crocodile)
40/5=8 groups
32 alligators, 8 crocodile

Answer-

There are 8 crocodiles and 32 alligators.

Solution-

Let's assume,

number of crocodiles = x, so number of alligators = 4x

As the total number of alligators and crocodiles is 40, so

\(\Rightarrow x+4x=40\)

\(\Rightarrow 5x=40\)

\(\Rightarrow x=\dfrac{40}{5}\)

\(\Rightarrow x=8\)

\(\Rightarrow 4\times x=4\times 8\)

\(\Rightarrow 4x=32\)

So, there are 8 crocodiles and 32 alligators.