Its a bit difficult to see what you are trying to do, but assume you want to use one tile map to spawn/change something on the other?
You have to set up some condition for the Ore tile map and then change it for the Main tile. Here is a simple example:
It uses two tile maps, one with orange boxes and one with green boxes. Based on where the orange boxes are placed I want to place green boxes on the right side of them.
So the code:
Using two loops to go through tile map 1, dividing the width and height with 50, because that's the size of the tiles will give me the tile index coordinate of the tile maps.
Then checking whether the giving tile on tile map 1 = 0 and if that's the case I set the tile right of the selected tile on tile map 2 to a green square.
You only really need to use positionToTile when you try to place a none tile map object, like a sprite on a tile map or if you want to track mouse position etc.
If what you are trying is to get a random tile from your Ore map and use it for your main tile map.
You just have to get the tile index using the same method I used above.
Tilemap.width / Tile.width
Tilemap.height / Tile.height
And if you need to randomize it
Random(Tilemap.width / Tile.width) etc.