"Expanding" a 2d array into a 1d array
Problems like this are often "academic" in nature (although the principles can be applied to other problem-spaces too).

In this instance, I believe that the challenge is to use the correct form of "modulo" and integer-division type arithmetic and to have a "simple" conversion function for each target element.

Your initial output array creation looks good:

int[] dest = new int[src.length * src[0].length * blockWidth * blockHeight];


Note that a zero-sized, or null src array will cause an Exception to be thrown when indexing src[0]. You should probably be more defensive about that...

if (src == null || src.length == 0) {
    return new int[0];
}


Now, in your dest, the value of each cell is a function of its index. There are a few critical values:


target rowsize -> source row-size * block-width
source row -> ( target index / target rowsize) / block-height
source column -> ( target index % target rowsize ) / block-width


Now, the above logic is far from "obvious", but it makes for a remarkably simple loop:

public static int[] expand(int[][] src, int blockWidth, int blockHeight) {
    int span = src[0].length * blockWidth;
    int[] dest = new int[src.length * blockHeight * span];
    for (int i = 0; i &lt; dest.length; i++) {
        dest[i] = src[(i / span) / blockHeight][(i % span) / blockWidth];
    }
    return dest;
}


You can see the above running in ideone: https://ideone.com/sJhksT

Note that the concept of describing an element in an output array as a function of the output index is sometimes a nice "trick" and neatens things up. You have to be able to spot this, though, in real code. Note that the above code basically says dest[i] = fn(i) where fn(i) is some function taking i as an argument.

Your code, on the other hand, works off the source index, and it tries to calculate the indexes in the output array from the source location. That's not "wrong", but as you can see, it makes for a nested, and ugly loop.

Knowing when to reverse the logic is more of an art than a science, but being able to identify these logic inversions is important.