if you want to take the bus to yosemite valley from mammoth lakes check here for the yarts bus schedule. if you are set on leaving from mammoth lakes you can take the bus to reds meadow near the devil’s postpile or you can take a side trail from horseshoe lake that takes you to the jmt/pct about 4 miles south of reds meadow. that trail can be seen on the tom harrison jmt maps.
as far as permits go, when i did the jmt i got a walk-up permit the day before i started in yosemite valley. the other three guys i was with already had one reserved in advance. but they save some just for walk-up, but i would be the first one in line the day before you want to start. as far as getting one going in near reds meadow, i think you need to get it from the governing body of whereever you enter. so at reds meadow, it would be the ansel adams wilderness, which is managed by the Inyo National Forest. their office is in bishop, just south of mammoth lakes.
jerm