4days in Tokyo and then go to Kyoto for staying and visiting Nara,Osaka and probably Hiroshima and Miyaji island.
So, you will fly out from Kansai Airport [KIX]?
Will you fly into Narita [NRT]or maybe Tokyo Haneda [HND]?
When you plan to visit also Hiroshima City and Miyajima Island,
I suggest you make a combination of JR regular tickets to go to Kyoto
(available at 13400 to 13800 yen, for a Shinkansen Hikari train ride with your seat reserved)
and a JR-West (5-day) Kansai-Hiroshima Area Pass
(available at 13500 yen when ordered outside Japan) for your trips in western Japan.
The sum of the prices is 26900 to 27300 yen, a little less than the price 29110 yen of a 7-day Ordinary-Class Japan Rail Pass to be applied when it is ordered outside Japan.
(Here a fluctuation in the currency exchange rate is not considered.)
This JR-West pass can be booked in advance via the website then purchased in Kyoto Station, at the JR Ticket Office near Central Gate of the non-Shinkansen zone.
- JR-West Kansai-Hiroshima Area Pass http://www.westjr.co.jp/global/en/ticket/pass/kansai_hiroshima/
When you take this option,
you don't have to struggle for your rail pass before your arrival,
neither to try to pack your major JR train rides within 7 consecutive days;
also, unlike the Japan Rail Pass, this JR-West pass allows you to take Shinkansen Nozomi and Mizuho trains between Shin-Osaka and Hiroshima.
A possible demerit is that a JR-West pass is not valid on the Shinkansen section Kyoto -- Shin-Osaka, which is operated by JR Central, not JR West.
You can take a Special Rapid train (on the JR Kyoto Line) to go between Kyoto and Shin-Osaka or Osaka.
Shinkansen is available at Shin-Osaka Station, but not at Osaka Station. maybe i change the date to April-May...
In that case, please pay attention to the Golden Week holiday season, which in 2018 will be from 28 April until 6 May; popular tourist spots may be much crowded with visitors. https://www.japan-guide.com/e/e2282.html