I have explained in the previous post how music intervals work. On this post I will explain how to apply an interval to a given step. This is called a transposition.
I will also use a keyboard for my explanations:
{<1>}Keyboard

Diatonic

You have to apply first the diatonic, which will give the base pitch step. You take the current base pitch step (the white key), and you add the same number of white keys than the number of diatonic. The base pitch step for a G# is G. If you add 3 white keys, you get a C.

Chromatic

To get the actual sound you have to start from the current note, and move to the same number of keys (white and black) than the number of chromatics. If you have a G#, then you start on the black key at the right of the G.

Simple example

Let's take an interval of 2 diatonic and 4 chromatic. This is the interval between C and E. If you apply this interval to D, you get a F#. You change the base note by applying the diatonic. E becomes F. Then you apply the chromatic to get the alteration of F which is a # in this case.

Double accidentals

Let's take the previous interval: 2 diatonic and 4 chromatic. We will start from D#. You add the 2 diatonic which gives F. When you use the chromatic, it gives you F##, which is an enharmonic with G.

Overflow

Sometimes, you cannot apply an interval this way. Let's say you have an interval of 2 diatonic and 5 chromatic. This is the interval between C and E#. If you apply it to D#, the base pitch step is theoretically of F. But to represent the actual sound you would need 3 sharps, which is a very uncommon notation. To reduce the number of sharps, you can move to the next enharmonic, which is G#. The diatonic value is not respected (since it becomes 3), but the chromatic is, which is the most important.

Now you know how to apply an interval. I will describe in the next post the transposition possibilities in Flat.