Let the number of fruit trees be t.
It is given that, The number of non-fruit trees were two more than three times the number of fruit trees
Then the number of non-fruits tree =3t+2
Total number of trees =102
⇒t+3t+2=102
⇒4t+2=102
⇒4t=102−2
⇒4t=100
⇒t=1004
⇒t=25
Therefore, the number of fruit trees are 25.