In order to return a value - any value - from a method, you have to include the return type in the method signature:
void
indicates it returns no value, and a type indicates the class or struct that it will return an instance of:
Methods - C# Programming Guide | Microsoft Docs[
^]
Without a type prefix, it is a constructor, and they cannot return anything as they always return the instance that was created.
You can't "call" a constructor from a constructor, that way just leads to madness and crashing apps when they run out of stack space ...
What you want is probably more like this:
GetRandomPosition(float x = float.MinValue, float y = float.MinValue)
{
x = x != float.MinValue? x : random.Range(minX, maxX);
y = y != float.MinValue? y : random.Range(minY, maxY);
...
}
Which used optional parameters to do what you wanted.