To get mega stone for sharpedo and camerupt you need to go to slateport and talk to charlene and participate in hoenn
festival. You can only bring 3 pokemons ( one that knows surf / one that knows rock smash and one thats resistant to fire). You need those pokemons to finish 1st place in the trials:
!st trial is rock smashing (mine was haxorus)
2nd is for resisting fire (mine was flash fire ninetales)
3rd surf pokemon for surf race( you can use your surf mount)
i would advise to take strong pokemons since u will battle lvl 84-86 trainers during the surf race.
Once you won all the trials and took 1st place overall you will get both mega stones as a reward .
If you lose the trials there is once per in game day cooldwon which means once its 00:01 you can try again if you lost.