Hi @denisyukJ
As @rcrdzmmrmnn mentioned, the ScaleBasis Method returns the scaled transformation you need to replace the existing transform with. Since you're trying to scale the solid from the origin, Once I object is scaled it moves from the origin, we need to translate it to origin position using Transform.Origin. Refer to the code below for additional reference.
Scale without translate
Transform transform = Transform.Identity;
transform.Origin= extractedSolid.ComputeCentroid();
transform = transform.ScaleBasis(2.0);
Solid scaledSolid = SolidUtils.CreateTransformed(extractedSolid, transform);

Scale and Translate it to origin
///Instead of Indentity Matrix take the BoundingBox of the Solid
Transform transform = extractedSolid.GetBoundingBox().Transform;
transform = transform.ScaleBasisAndOrigin(1.1);
//After the Translation the Solid will be moved from the origin
///By using translation we can move the Solid to the origin
transform.Origin = extractedSolid.ComputeCentroid() - transform.Origin;
Solid scaledSolid = SolidUtils.CreateTransformed(extractedSolid, transform);

Visualization Methods
List<GeometryObject> geoObjects = new List<GeometryObject>();
geoObjects.Add(scaledSolid);
using (Transaction createSolid = new Transaction(doc, "Visualize Solid"))
{
createSolid.Start();
DirectShape directShape = DirectShape.CreateElement(doc, new ElementId(BuiltInCategory.OST_GenericModel));
directShape.SetShape(geoObjects);
createSolid.Commit();
}
Hope this will helps 🙂
Mohamed Arshad K
Software Developer (CAD & BIM)