You won't be able to directly create a strongly-typed instance of the class, as the compiler doesn't have enough information to know what the closed generic type is.
You can create a late-bound instance of the type using reflection:
Type t = obj.GetType();
Type myType = typeof(ClassA<>).MakeGenericType(t);
object instance = Activator.CreateInstance(myType);
Or you can use reflection to call a generic method to create and use the instance:
static class Helper
{
private static readonly MethodInfo DoStuffMethod = typeof(Helper).GetMethod("DoStuffHelper", BindingFlags.NonPublic | BindingFlags.Static);
private static void DoStuffHelper<T>(T value)
{
var instance = new ClassA<T>();
...
}
public static void DoStuff(object value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
Type t = value.GetType();
MethodInfo m = DoStuffMethod.MakeGenericMethod(t);
m.Invoke(null, new[] { value });
}
}