As-salamu alaykum dear sister,
I am sorry your having such a hard time when your children get together to play with your friend’s children. At this age, often two rambunctious children who otherwise are rather calm can feed into each others energy and turn the house into a running zone! You are not alone in this, it is quite common.
I would kindly suggest that you sit down with your friend and instead of stating her son is causing chaos in the home when he comes to play, ask her for advice on how to calm your son when they come over. While it is not your son who is the energetic one but rather hers, if you frame it in this way she may state her son is rambunctious as well and she may not know how to deal with it either!
At this point perhaps the two of you can come up with a plan to make the play-dates more calmer by setting boundaries and rules which you both can go over with the boys. Additionally, by setting limits on behaviors, you can re-enforce their positive play with praise, toys or extra treats.
At this age children are still learning social skills, learning how to navigate in social interactions as well as looking (unconsciously maybe) to adults for guidance and direction regarding their play behaviors. As both boys are still young, they should not be let free to just rampage through the house but rather limits should be set and expectations as well as consequences (both positive and negative). This can be done by both you and the child’s mom.
As every child is different in regards to levels of aggression and play style, it could be that your son is energized by this child’s style of play and that is why you see a difference when he is playing with other children. This too is normal behavior as children often feed off of or model behaviors they see.
As his mom is a dear friend, I am sure if you approach her in the manner described above, it will become a joint project for the two of you to work on insha’Allah to balance out the play energy in your home when they are over.